Skip to content

Commit

Permalink
Fixed closed incidents being ignored (#13)
Browse files Browse the repository at this point in the history
Fixed bug where closed incidents wouldn't appear.

Also added extra workflow trigger to the health check. Now it will run
on the creation of an issue (so it can respond faster to incidents)
  • Loading branch information
Bullrich authored Aug 7, 2024
1 parent f4f3a0a commit c586313
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
issues:
types: [opened, closed]

env:
ARTIFACT_NAME: reports
Expand Down
2 changes: 1 addition & 1 deletion log/src/github/incidents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class IncidentManager {

async obtainPastIncidents(repo: Repo, maxAge: number): Promise<ReportFile["incidents"]> {
this.logger.info("Searching for previous incidents")
const issues = await this.api.rest.issues.listForRepo({ ...repo });
const issues = await this.api.rest.issues.listForRepo({ ...repo, state: "all" });
this.logger.info(`Found ${issues.data.length} issues`);
const incidents: ReportFile["incidents"] = []

Expand Down

0 comments on commit c586313

Please sign in to comment.