Skip to content

Commit

Permalink
♻️ Use HEAD instead of master
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Feb 1, 2021
1 parent d2fddfb commit 95c3254
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/automations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const createAutomatedIssue = async () => {
try {
if (!hasDisabledAutomatedIssues) {
const { data } = await axios.get(
`https://raw.githubusercontent.com/${owner}/${repo}/main/.upptimerc.yml`
`https://raw.githubusercontent.com/${owner}/${repo}/HEAD/.upptimerc.yml`
);
if (data.includes("hasDisabledAutomatedIssues")) hasDisabledAutomatedIssues = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/init-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const shouldContinue = async (): Promise<boolean> => {
if (`${owner}/${repo}` === "upptime/upptime") return true;
try {
const upptimeDefaultConfig = await axios.get(
"https://raw.githubusercontent.com/upptime/upptime/master/.upptimerc.yml"
"https://raw.githubusercontent.com/upptime/upptime/HEAD/.upptimerc.yml"
);
const thisRepoConfig = await readFile(join(".", ".upptimerc.yml"), "utf8");
if (upptimeDefaultConfig.data.trim() === thisRepoConfig.trim()) {
Expand Down
22 changes: 11 additions & 11 deletions src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ${pageStatuses
: page.status === "degraded"
? i18n.degraded || "🟨 Degraded"
: i18n.down || "🟥 Down"
} | [${page.slug}.yml](https://github.com/${owner}/${repo}/commits/master/history/${
} | [${page.slug}.yml](https://github.com/${owner}/${repo}/commits/HEAD/history/${
page.slug
}.yml) | <details><summary><img alt="${
i18n.responseTimeGraphAlt || "Response time graph"
Expand All @@ -109,63 +109,63 @@ ${pageStatuses
i18n.responseTime || "Response time"
} ${
page.time
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fresponse-time.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.responseTimeDay || "24-hour response time"
} ${
page.timeDay
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fresponse-time-day.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.responseTimeWeek || "7-day response time"
} ${
page.timeWeek
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fresponse-time-week.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.responseTimeMonth || "30-day response time"
} ${
page.timeMonth
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fresponse-time-month.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.responseTimeYear || "1-year response time"
} ${
page.timeYear
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fresponse-time-year.json"></a></details> | <details><summary><a href="${website}/history/${
page.slug
}">${page.uptimeWeek}</a></summary><a href="${website}/history/${page.slug}"><img alt="${
i18n.uptime || "All-time uptime"
} ${
page.uptime
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fuptime.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.uptimeDay || "24-hour uptime"
} ${
page.uptimeDay
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fuptime-day.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.uptimeWeek || "7-day uptime"
} ${
page.uptimeWeek
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fuptime-week.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.uptimeMonth || "30-day uptime"
} ${
page.uptimeMonth
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fuptime-month.json"></a><br><a href="${website}/history/${page.slug}"><img alt="${
i18n.uptimeYear || "1-year uptime"
} ${
page.uptimeYear
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2Fmaster%2Fapi%2F${
}" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2F${owner}%2F${repo}%2FHEAD%2Fapi%2F${
page.slug
}%2Fuptime-year.json"></a></details>`
)
Expand Down

0 comments on commit 95c3254

Please sign in to comment.