Add --base to agentpr pr edit #26

Merged
benvin merged 1 commits from benvin/agentpr-edit-base into main 2026-10-17 21:54:02 +11:00
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.
benvin merged commit 836fcc0aa5 into main 2026-10-17 21:54:02 +11:00
benvin deleted branch benvin/agentpr-edit-base 2026-10-17 21:54:02 +11:00
Sign in to join this conversation.