chore: add scripts/pr.sh and the land-pr skill for landing PRs #41

Merged
piscis merged 1 commit from piscis/pr-script-land-pr into main 2026-10-10 07:48:49 +00:00
Owner

Agents wrote the same CI polling loop and merge check by hand for every PR, and pulled in the interactive shell's prompt noise along the way. This PR replaces that hand-written code with a script and a skill.

  • scripts/pr.sh wait <rev> waits for the combined commit status and exits 0 only when it is success.
  • scripts/pr.sh merge <n> <sha> squash-merges as <title> (#n). Through head_commit_id, Forgejo refuses the merge if the PR moved past <sha>. Afterwards the script confirms on the API that the PR is merged and its branch is deleted.
  • Both read $FORGEJO_TOKEN. If it isn't set, they fall back to zsh -lic themselves.
  • /land-pr (user-invoked) runs the whole flow: branch, commit, rebase, push, PR, wait, merge and sync. Each step ends on a check you can verify.
  • docs/agents/forgejo.md now points at the script and the skill instead of restating the endpoints.

This PR is landed with /land-pr itself.

Agents wrote the same CI polling loop and merge check by hand for every PR, and pulled in the interactive shell's prompt noise along the way. This PR replaces that hand-written code with a script and a skill. - `scripts/pr.sh wait <rev>` waits for the combined commit status and exits 0 only when it is `success`. - `scripts/pr.sh merge <n> <sha>` squash-merges as `<title> (#n)`. Through `head_commit_id`, Forgejo refuses the merge if the PR moved past `<sha>`. Afterwards the script confirms on the API that the PR is merged and its branch is deleted. - Both read `$FORGEJO_TOKEN`. If it isn't set, they fall back to `zsh -lic` themselves. - `/land-pr` (user-invoked) runs the whole flow: branch, commit, rebase, push, PR, wait, merge and sync. Each step ends on a check you can verify. - `docs/agents/forgejo.md` now points at the script and the skill instead of restating the endpoints. This PR is landed with `/land-pr` itself.
chore: add scripts/pr.sh and the land-pr skill for landing PRs
All checks were successful
ci / build (pull_request) Successful in 22s
60cb23d069
piscis merged commit 27efdd1c66 into main 2026-10-10 07:48:49 +00:00
piscis deleted branch piscis/pr-script-land-pr 2026-10-10 07:48:49 +00:00
Sign in to join this conversation.
No description provided.