fix(incidents): gitea_incident_report dry run reports "Incident Ticket: Created" #29
Labels
No labels
area/dsh
area/forgejo
experiment
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-gitea#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
gitea_incident_reportwithdry_run: trueprintsIncident Ticket: Created ..., which is false: no issue is created. The operator cannot tell a preview from a real ticket.Repro
gitea_issue_listonml-lab/tarditsafterwards shows only#1and#2— no incident issue was created.Observed vs expected
Incident Ticket (dry-run): would create "..." (labels: ...) — pass dry_run:false to file it, ideally with the sanitized body preview. Real creation should keep the "Created" wording and include the issue number/URL.Root cause
lib/incident-report.jscorrectly returns{ dryRun: true, title, body, labels, sanitizedLogs }early. The formatter (lib/handlers/formatters.js,gitea_incident_reportbranch) ignoresdata.dryRun:Proposed fix
Branch on
data.dryRunin the formatter and show a preview; on real creation include the issue number/link. Add formatter tests for both shapes.Acceptance: dry-run never says "Created"; real creation reports the issue number.
Duplicate check
Searched
incident(state all) — no existing issue.Layer
dsh-gitea plugin/tool (formatter).
Fixed in
281eade(PR #40).The formatter branches on
dryRun:Incident Ticket (dry-run): would create "…" with labels […] — pass dry_run:false to file it.plus a sanitized body preview; real creation reports#Nand the URL. Also fixed the write path: default labels are now the housetype/bug+priority/now, resolved to ids, and label names are never sent to Forgejo (previously the upstreamtype/incident/priority/critical/status/readyset would fail on house repos).Live dry run: correct preview, no “Created”.
Tests:
test/qa-defaults.test.mjs(dry run, real creation, resolved ids, no-name fallback).