|
| 1 | +--- |
| 2 | +name: ship-pr |
| 3 | +description: > |
| 4 | + Babysit a PR. Iterate with AI reviewers and CI. Get it ready and maybe merge. |
| 5 | + Send summary message. |
| 6 | +--- |
| 7 | + |
| 8 | +# Ship PR |
| 9 | + |
| 10 | +## Loop |
| 11 | + |
| 12 | +1. Mark ready — `kody:@kentcdodds/github-pr-tools/set-pr-review-status` with |
| 13 | + `{ prUrl, status: 'ready' }`, or `{ owner, repo, prNumber, status: 'ready' }` |
| 14 | +2. Wait for CI — `gh pr checks` (compose `loop-on-ci`, `fix-ci`) |
| 15 | +3. Fix failures; address valid AI-reviewer feedback (ignore insignificant nits / |
| 16 | + already-fixed / wrong) |
| 17 | +4. Green and no valid feedback left → break |
| 18 | +5. Push → repeat |
| 19 | + |
| 20 | +## Mode |
| 21 | + |
| 22 | +By default, continue to Discord message with summary and include PR link |
| 23 | + |
| 24 | +If explicitly requested, merge PR as Kody with |
| 25 | +`kody:@kentcdodds/github-pr-tools/merge-pr` using |
| 26 | +`{ prUrl, mergeMethod: 'squash' }` (or `{ owner, repo, prNumber, ... }`; |
| 27 | +optional `commitTitle`), watch CI deploy, when finished, continue to the discord |
| 28 | +message and include a summary with link to PR, deployed URL link, or failing job |
| 29 | +link. |
| 30 | + |
| 31 | +Other useful exports on the same package: `get-pr-checks` for check-run status |
| 32 | +without `gh`, and `github-client` (`ghRestFetch` / `ghGraphQL`) for one-off |
| 33 | +authenticated GitHub calls. |
| 34 | + |
| 35 | +## Done → Discord |
| 36 | + |
| 37 | +```javascript |
| 38 | +import sendMeAMessage from 'kody:@kentcdodds/discord-gateway/send-me-a-message' |
| 39 | + |
| 40 | +export default async function main() { |
| 41 | + const content = ` ... ` |
| 42 | + return sendMeAMessage({ content }) |
| 43 | +} |
| 44 | +``` |
0 commit comments