CICD-364 · Automated incident creation
Encyclopedia · Observability and SRE pipelines · All snippets
Previous · CICD-363 · Next · CICD-365
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites staging metrics stack, provisioned endpoints and read-only CI identity except explicitly approved writes.
- Platforms github-actions, github-cli.
- Parameters
INCIDENT_REPO,RUN_URL.
2. Copy the snippet
bash
gh issue create --repo "${INCIDENT_REPO:?}" --title 'Staging deployment health gate failed' --body "Evidence: ${RUN_URL:?}" --label incident3. How it works
The CLI creates an incident issue in the scoped repository with a link to sanitized evidence. Keep a stable deployment ID to avoid opening duplicates on retry.
4. Verify the result
Use a scoped account and deduplicate by deployment ID before creating an issue. Keep user data out of evidence.
Validation syntax-validated (Bash parse). Status definitions.