Skip to content

Commit

Permalink
♻️ Always add "upptime" label if not there
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 5, 2020
1 parent 9882f48 commit c802d6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ ${pageStatuses
.split("]")[0]
.replace("[", "")}, powered by @upptime`,
});
if (!repoInfo.data.topics.length && !config.skipTopicsUpdate)
if (!repoInfo.data.topics.includes("upptime") && !config.skipTopicsUpdate)
await octokit.repos.replaceAllTopics({
owner,
repo,
names: ["uptime-monitor", "status-page", "upptime"],
names: [...repoInfo.data.topics, "uptime-monitor", "status-page", "upptime"].filter(
(value, index, array) => array.indexOf(value) === index
),
});
if (!repoInfo.data.homepage && !config.skipHomepageUpdate)
await octokit.repos.update({
Expand Down

0 comments on commit c802d6f

Please sign in to comment.