Skip to content

fix(incidentio): map the status categories the API returns - #9375

Open
ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/incidentio-status-category
Open

ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/incidentio-status-category

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

mapStatusCategory in the incident.io converter matched category names the API doesn't return. The categories of IncidentStatusV2 are triage, declined, merged, canceled, live, learning, closed and paused (List Incidents V2). active and post-incident are only the app's names for live and learning, and declared and resolved aren't categories.

Because of this:

  • Declined, merged and canceled incidents fell through to IN_PROGRESS and stayed open in issues.
  • live and learning reached IN_PROGRESS only through the default branch and logged "unknown incident.io status category" for every row.

Changes:

  • tasks/incidents_converter.go: triage, live, learning and paused map to IN_PROGRESS, and closed, declined, merged and canceled map to DONE. These are all terminal, and the Rootly plugin maps cancelled to DONE the same way. Unknown categories still fall back to IN_PROGRESS with a warning.
  • tasks/incidents_converter_test.go: the cases use the API's names. active and post-incident are now expected to be unknown. The new cases fail on the old mapping.
  • e2e/raw_tables/_raw_incidentio_incidents.csv: the one row with "category": "active" now uses live. That row is in another incident type, so no snapshot changes.

Resolution date and lead time are unchanged; they still come from the "Resolved at" timestamp.

Does this close any open issues?

Fixes #9374

Screenshots

N/A

Other Information

  • go test ./plugins/incidentio/tasks/: pass.
  • go vet, gofmt and golangci-lint run ./plugins/incidentio/...: clean. The incidentio e2e tests need E2E_DB_URL, which I didn't run locally; the only fixture change is in a row that the e2e test filters out.
  • No open PR or issue touches the incidentio plugin.
  • Suggested label: pr-type/bug-fix.
  • AI assistance disclosure: this change was prepared with the help of Claude Code (Claude Opus 5.5), and I reviewed the diff. The commit carries a Generated-by: trailer per the ASF generative tooling guidance.

🤖 Generated with Claude Code

mapStatusCategory matched triage, declared, active, paused,
post-incident, closed and resolved. The incident.io API returns
triage, declined, merged, canceled, live, learning, closed and paused;
active and post-incident are only the app's names for live and
learning. Declined, merged and canceled incidents fell through to
IN_PROGRESS and stayed open, and live and learning logged an unknown
category warning.

Map triage, live, learning and paused to IN_PROGRESS and closed,
declined, merged and canceled to DONE, and use live in the e2e raw
fixture.

Fixes apache#9374

Generated-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][incident.io] Status categories declined, merged and canceled are mapped to IN_PROGRESS

2 participants