Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/lib/ops/rollback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ export function buildIncidentTicket(
): IncidentTicketInput {
const severity = classifyRollbackSeverity(event);
const title = `[${severity}] Automated rollback: ${event.workflowName} ${event.conclusion} (${shortSha(event.sha)})`;
const runCell = event.runUrl ? `[Actions run](${event.runUrl})` : "n/a";
const lastKnownCell = lastKnownGood
? lastKnownGood.url
? `[${shortSha(lastKnownGood.sha)}](${lastKnownGood.url}) (\`${lastKnownGood.id}\`)`
: `\`${lastKnownGood.sha}\` (\`${lastKnownGood.id}\`)`
: "_none found_";

const body = [
"## Automated deploy failure",
Expand All @@ -159,9 +165,9 @@ export function buildIncidentTicket(
`| Failed SHA | \`${event.sha}\` |`,
`| Ref | ${event.ref} |`,
`| Actor | ${event.actor} |`,
`| Run | ${event.runUrl} |`,
`| Run | ${runCell} |`,
`| Outcome | ${outcome} |`,
`| Last known-good | ${lastKnownGood ? `\`${lastKnownGood.sha}\` (\`${lastKnownGood.id}\`)` : "_none found_"} |`,
`| Last known-good | ${lastKnownCell} |`,
"",
"This ticket was opened by rollback automation. Do not close it until:",
"1. Production is serving the last known-good artifact (or a confirmed fix).",
Expand Down