@@ -18,9 +18,11 @@ Identify the PR that was just merged.
1818 - Check ` git reflog --oneline -20 ` for the previous branch name
1919 - If no branch found, ask the user for the PR number or branch name
20203 . Look up the merged PR:
21- ```
21+
22+ ``` bash
2223 gh pr list --state merged --head < branch> --json number,title,mergeCommit -L 1
2324 ```
25+
24264 . If no PR found: ask the user for the PR number directly
25275 . Display: PR number, title, merge commit SHA
2628
@@ -31,14 +33,16 @@ Identify the PR that was just merged.
3133Check that CI passed on the merge commit.
3234
33351 . List recent runs on master:
36+
37+ ``` bash
38+ gh run list --branch master -L 20 --json status,conclusion,databaseId,name,headSha
3439 ```
35- gh run list --branch master -L 5 --json status,conclusion,databaseId,name,headSha
36- ```
37- 2 . Match by merge commit SHA if possible
38- 3 . Based on status:
39- - ** in_progress** : watch it with ` gh run watch <id> `
40- - ** success/completed with conclusion=success** : proceed
41- - ** failure** : show details via ` gh run view <id> --log-failed `
40+
41+ 2 . Filter to runs whose ` headSha ` matches the merge commit SHA
42+ 3 . Evaluate all matched runs:
43+ - ** in_progress** : watch still-running run(s) with ` gh run watch <id> `
44+ - ** success** : all matched runs must be ` completed ` with ` conclusion=success ` to proceed
45+ - ** failure** : show details via ` gh run view <id> --log-failed ` for each failing run
4246 - Ask: "Is this a recurring issue or specific to this PR?"
4347 - If recurring: suggest adding to ` /done ` validation or pre-merge CI
4448 - If specific: diagnose inline from the failed log output
@@ -51,7 +55,7 @@ Check for deployment status if configured.
51552 . If it exists:
5256 - Read the file and iterate over configured environments
5357 - For each environment:
54- - Watch the deployment workflow: ` gh run list --workflow <workflow> -L 1 --json status,conclusion,databaseId `
58+ - Watch the deployment workflow: ` gh run list --workflow <workflow> --commit <merge-commit-sha> --json status,conclusion,databaseId `
5559 - If ` health_check ` URL is configured, fetch it and verify a 200 response
5660 - Report per-environment status (success/failure/in_progress)
57613 . If no config file:
@@ -87,7 +91,7 @@ Check if there is more planned work.
8791
8892Output a summary of everything that happened:
8993
90- ```
94+ ``` text
9195# Landed
9296
9397PR: #N "<title>" merged into master
0 commit comments