Add --base to agentpr pr edit #26

Open
unkin-agent wants to merge 1 commits from benvin/agentpr-edit-base into main
Member

Stacked PRs need retargeting when their parent changes, and pr edit could only change title and body.

  • add --base to agentpr pr edit, sent as base in the PATCH
  • reject an empty --base and require at least one of --title, --body or --base
  • document the retarget in the README
Stacked PRs need retargeting when their parent changes, and `pr edit` could only change title and body. - add `--base` to `agentpr pr edit`, sent as `base` in the PATCH - reject an empty `--base` and require at least one of `--title`, `--body` or `--base` - document the retarget in the README
unkin-agent added 1 commit 2026-10-17 12:52:42 +11:00
Add --base to agentpr pr edit to retarget a PR
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
4ef8f458e2
Author
Member
  • nit: cmd/agentpr/main_test.go:52 — TestIssueEditHasNoBaseFlag claims the usage error must not suggest --base, but only asserts cobra rejects an unknown flag; the Lookup("base") branch is covered only by the existing TestIssueEditRequiresTitleOrBody → rename the test to match what it checks, or drop it.
  • nit: cmd/agentpr/main.go:236 — editOptions branches on cmd.Flags().Lookup("base") to pick the error text, which hides per-command behaviour in a shared helper → pass the allowed-flag list/message in from the caller, or keep as is.
- nit: cmd/agentpr/main_test.go:52 — TestIssueEditHasNoBaseFlag claims the usage error must not suggest --base, but only asserts cobra rejects an unknown flag; the Lookup("base") branch is covered only by the existing TestIssueEditRequiresTitleOrBody → rename the test to match what it checks, or drop it. - nit: cmd/agentpr/main.go:236 — editOptions branches on cmd.Flags().Lookup("base") to pick the error text, which hides per-command behaviour in a shared helper → pass the allowed-flag list/message in from the caller, or keep as is.
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
Required
Details
ci/woodpecker/pr/pre-commit Pipeline was successful
Required
Details
ci/woodpecker/pr/test Pipeline was successful
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin benvin/agentpr-edit-base:benvin/agentpr-edit-base
git checkout benvin/agentpr-edit-base
Sign in to join this conversation.