ShivamSharma43 opened a new pull request, #9375: URL: https://github.com/apache/devlake/pull/9375
### 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](https://docs.incident.io/api-reference/incidents-v2/list)). `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](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
