Skip to content

Commit

Permalink
🚀 Deploy new version [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pabio-escobar committed Sep 8, 2022
1 parent a00ef05 commit c7cc537
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
20 changes: 20 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153360,12 +153360,22 @@ const update = async (shouldCommit = false) => {
.map((i) => i.trim())
.filter((i) => i.length);
if (dayjs_1.default(metadata.end).isBefore(dayjs_1.default())) {
await octokit.issues.unlock({
owner,
repo,
issue_number: incident.number,
});
await octokit.issues.update({
owner,
repo,
issue_number: incident.number,
state: "closed",
});
await octokit.issues.lock({
owner,
repo,
issue_number: incident.number,
});
console.log("Closed maintenance completed event", incident.number);
}
else
Expand Down Expand Up @@ -153642,6 +153652,11 @@ generator: Upptime <https://github.com/upptime/upptime>
}
else if (issues.data.length) {
// If the site just came back up
await octokit.issues.unlock({
owner,
repo,
issue_number: issues.data[0].number,
});
await octokit.issues.createComment({
owner,
repo,
Expand All @@ -153657,6 +153672,11 @@ generator: Upptime <https://github.com/upptime/upptime>
issue_number: issues.data[0].number,
state: "closed",
});
await octokit.issues.lock({
owner,
repo,
issue_number: issues.data[0].number,
});
console.log("Closed issue");
try {
const upmsg = await secrets_1.getSecret("NOTIFICATIONS_UP_MESSAGE") ? (secrets_1.getSecret("NOTIFICATIONS_UP_MESSAGE") || "")
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions dist/update.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7cc537

Please sign in to comment.