[READ-ONLY] Mirror of https://github.com/openstatusHQ/cli. OpenStatus CLI www.openstatus.dev

Feat/incident command (#40)

* chore(deps): bump openstatus api sdk for IncidentService Pin buf.build/gen/go/openstatus/api to BSR commit 404d544bfc59, which ships openstatus.incident.v1. The generated connect module requires go 1.26 and connectrpc.com/connect v1.21.1. The new SDK deprecates the Mumbai region and SMS notifications; their read paths stay for existing resources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): surface failed_precondition errors The API now returns failed_precondition for requests that conflict with the current state of a resource, across every service. Show the server message instead of the raw connect error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: add incident command Add 'openstatus incident' (aliases inc, incidents) on top of the new IncidentService: list, info, declare (with a short wizard), update, set-status plus mitigate/resolve/reopen/cancel shortcuts, note, link-report/unlink-report, close and delete. Mutations print the incident as JSON with --json and only the ID with -q; otherwise a success line and a next-step hint. Cancelling, closing and deleting ask for confirmation unless -y is passed. Conflicts and permission errors get incident-specific hints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(incident): add postmortem subcommands Add 'openstatus incident postmortem' (alias pm) with show, edit and approve. show pages the body with its review status in a terminal and prints the raw markdown when piped, so show and edit round-trip through a file. edit takes --file (or - for stdin) or --content; approve can also close the incident. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(status-report): link reports to incidents Add 'status-report create --incident-id' to link a new report to an incident in the same step, and show the linked incident in 'info' and in the JSON output of 'info' and 'list'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: document incident command Add the incident command to the app help, README and the CLI skill. The skill now tells agents to declare an incident first and publish a linked status report when users are affected. Regenerate the markdown docs and the man page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(incident): address review feedback - approve: only report a missing postmortem when the server says so - permission denied: keep the server reason and append the role hint - declare: validate passed flags before opening the wizard - list: ignore ANSI codes when measuring table column widths - read from stdin: tell TTY users to press Ctrl-D - postmortem edit --file: trim one trailing newline like stdin does - status-report create: confirm the incident link from the response - ci: use go.mod for the test workflow Go version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix pr --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


Author thibault.tngl.sh
Co-author Claude Opus 5.5 Committer GitHub Date Commit Parent 11f5dc6c