Skip to content

Commit

Permalink
🐛 Only add a maintenance event if start date has passed (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheemap authored Dec 16, 2023
1 parent 013d5ed commit 9ecdca4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ export const update = async (shouldCommit = false) => {
issue_number: incident.number,
});
console.log("Closed maintenance completed event", incident.number);
} else
} else if (dayjs(metadata.start).isBefore(dayjs())) {
ongoingMaintenanceEvents.push({
issueNumber: incident.number,
metadata: { start: metadata.start, end: metadata.end, expectedDegraded, expectedDown },
});
}
}
}

Expand Down

0 comments on commit 9ecdca4

Please sign in to comment.