Repository navigation
Use the visible pull request flag in CLI help - #77472
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified, and the supplied evidence indicates the canonical flag documentation and related help-output tests were updated consistently.
No open issues 🎉
What changed in this PR
Updates CLI help and reference documentation to consistently use the visible --create-pull-request flag while retaining --pr as a hidden compatibility alias.
Changes:
- Replaced
--prwith--create-pull-requestin command examples and auto-merge help text. - Updated CLI reference documentation to describe the canonical flag and hidden alias.
- Adjusted tests to verify visible flag usage across affected commands.
| File | Description |
|---|---|
| pkg/cli/upgrade_command.go | Updates upgrade examples and auto-merge help text to use the canonical pull-request flag. |
| pkg/cli/update_upgrade_auto_merge_test.go | Adds coverage for canonical pull-request flag usage across affected command help output. |
| pkg/cli/update_integration_test.go | Updates integration expectations for the visible pull-request flag in update help. |
| pkg/cli/update_command.go | Updates update examples and auto-merge help text to use the canonical pull-request flag. |
| pkg/cli/pr_command.go | Updates pull-request transfer examples and auto-merge help text to use the canonical flag. |
| pkg/cli/init_command.go | Updates init examples and auto-merge help text to use the canonical pull-request flag. |
| pkg/cli/init_command_test.go | Updates init help assertions for the canonical pull-request flag. |
| pkg/cli/deploy_command.go | Updates deploy examples and auto-merge help text to use the canonical pull-request flag. |
| pkg/cli/add_wizard_command.go | Updates add-wizard examples and auto-merge help text to use the canonical flag. |
| pkg/cli/add_wizard_command_test.go | Updates add-wizard help assertions for the canonical pull-request flag. |
| pkg/cli/add_command.go | Updates add examples and auto-merge help text to use the canonical pull-request flag. |
| pkg/cli/add_command_test.go | Updates add command help assertions for the canonical flag. |
| docs/src/content/docs/setup/cli.md | Updates CLI reference examples and options to document the canonical flag and hidden compatibility alias. |
Review effort: Lite (dynamic)
There was a problem hiding this comment.
Found one consistency issue: the shared auto-merge validation error still recommends the hidden --pr alias, despite the updated visible help and docs. Please update that message and related assertions while preserving alias compatibility. No code execution or tests were performed; this was a static diff review.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| require.NotNil(t, flag) | ||
| assert.Equal(t, "false", flag.DefValue) | ||
| assert.Contains(t, flag.Usage, "requires --pr or --create-pull-request") | ||
| assert.Contains(t, flag.Usage, "requires --create-pull-request") |
There was a problem hiding this comment.
The flag usage is now canonicalized to --create-pull-request, but the actual validation error still tells users --pr or --create-pull-request (from requireAutoMergePR). Because --pr is hidden, users hitting gh aw init --auto-merge still receive guidance centered on the hidden alias, so the CLI output remains inconsistent with this change. Please update the shared error message and its assertions to use the visible flag while continuing to accept --pr as a compatibility alias.
There was a problem hiding this comment.
Updated the shared validation error and all matching assertions to use the visible --create-pull-request flag; --pr remains supported as an alias. Commit: 8a3ce61.
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /tdd. The rename is applied consistently across flag usage, Cobra examples, the CLI reference, and tests, and the targeted Go tests pass on the PR head. A few references outside the diff still advertise the old wording, so the consistency sweep is not finished yet.
📋 Key Themes & Highlights
Key Themes
- Stale runtime error:
pkg/cli/pr_helpers.go:28still returns--auto-merge requires --pr or --create-pull-request. Several tests assert that text, so this change is tightly coupled to the PR even though the line is outside the diff. - Stale docs outside the diff:
docs/src/content/docs/setup/working-with-workflows.mdx:90lists--pras an installation option, and.github/aw/cli-commands.md:272,301and.github/aw/upgrade-agentic-workflows.md:78still mention it. - Hidden-flag contract untested: nothing asserts that
--prstays hidden on all seven commands.
Positive Highlights
- ✅ The docs now state that
--pris a hidden compatibility alias, which makes the migration path clear. - ✅ The new table test covers all seven commands, and the help-text assertions match the visible flag name.
- ✅ The change is behaviour-neutral:
--prstill works and stays hidden.
⚠️ Remaining uncertainty
I did not verify the non-Go docs beyond grep, and I did not run the full pkg/cli suite, only the targeted tests for the changed commands.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| assert.Contains(t, flag.Usage, "requires --pr or --create-pull-request") | ||
| assert.Contains(t, flag.Usage, "requires --create-pull-request") | ||
| require.NoError(t, cmd.Flags().Set("auto-merge", "true")) | ||
| require.ErrorContains(t, cmd.RunE(cmd, nil), "--auto-merge requires --pr or --create-pull-request") |
There was a problem hiding this comment.
[/codebase-design] This assertion pins the old --pr wording of the runtime error. The message is defined in pkg/cli/pr_helpers.go:28 (outside this diff) and still reads --auto-merge requires --pr or --create-pull-request, so users who hit this error still see the hidden alias. About ten ErrorContains and EqualError assertions across the add, add-wizard, deploy, init, update, upgrade, and interactive tests repeat that string.
💡 Suggested change
Change the message to --auto-merge requires --create-pull-request and update those assertions in the same PR. The test updates are mechanical, and the error text then matches the help text.
@copilot please address this.
There was a problem hiding this comment.
Changed the runtime error and affected tests to say --auto-merge requires --create-pull-request. Commit: 8a3ce61.
| assert.Contains(t, flag.Usage, "requires --create-pull-request") | ||
| assert.NotContains(t, flag.Usage, "requires --pr") | ||
| assert.Contains(t, cmd.Example, "--create-pull-request --auto-merge") | ||
| assert.NotContains(t, cmd.Example, "--pr --auto-merge") |
There was a problem hiding this comment.
[/tdd] The new table test checks help text but not the compatibility contract this PR relies on: --pr must stay hidden on all seven commands. Add an assertion so that unhiding the alias fails this test.
💡 Suggested test
prFlag := cmd.Flags().Lookup("pr")
require.NotNil(t, prFlag)
assert.True(t, prFlag.Hidden, "--pr must stay a hidden compatibility alias")All seven commands already call MarkHidden("pr"), so this passes today and guards against regressions.
@copilot please address this.
There was a problem hiding this comment.
Added an assertion across all seven commands that --pr remains a hidden compatibility alias. Commit: 8a3ce61.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "68e494b0cd146fcba505c8e2de9982fa8abc045d",
"kind": "requested",
"schema_version": "1",
"state": "0d2803214f80985c97516b1fb0fb6e102aa237717a3c78543c56cc9df5f7de8e",
"work": [
"2ec1c55a56c3bbc3d439b0f0d819e0f964a9c8ea5c8bbe45cc9676c7e7802a18",
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"a3e20ab8b09b7df9fbf9e8f4ef78fe155be976883f328f62e422b37eb6cf78ef",
"b54b38c09a563c3f5df721f27f74e19078a31291ced1d4978c79d2fe3199c378",
"c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e",
"cab84320d42b193212d8083dabe68b5e8eadea1cf3182410a8537c102ed86ec8"
],
"workflow": "pr-sous-chef"
}
|
…cy-fix Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43455153130,
"head": "8a3ce61a307e3fb7674e8cd1bbba84c7f9050344",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "77e899cd56d58623ef387fe1b618555f80b192a92c34f108eaa9f175ee2319af",
"work": [
"2ec1c55a56c3bbc3d439b0f0d819e0f964a9c8ea5c8bbe45cc9676c7e7802a18",
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
The reported run failed |
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43471474197,
"head": "f04856d5b02e83ae1ba01afb9c93714a129bb360",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "c29f7b6d311f054937a1cbf0feb154b5a9d77e7c77d472769408557d3190d828",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in |
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43476890978,
"head": "34398372262fc44734019a8d7df34559e373cccc",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "879a6f8c4e97bd17df6097456ae87dd59c220d95d3d94b9b641d04abf1e122cc",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in |
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43483411244,
"head": "0c75b2a0d741dcf2b7711e355864e6e319a844c1",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "46efac3c1edb974cffe40d1eec5392f03efe029007e1577ea6062996d76afcfd",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed in |
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Please address the remaining CI failures on this PR's existing branch. No merging or CI triggering. Structured data{
"completed_task": 43490784194,
"head": "b38b8fcfb6a59fd16970c032e0862dca08540b09",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "f01d2fde70a9abe72e666ee831a73d88f6190a431e5cdf7bc6e607276a39012a",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in I updated |
|
🎉 This pull request is included in a new release. Release: |
CLI help examples and auto-merge descriptions referenced the hidden
--pralias, while the reference docs presented it as a listed option. Use--create-pull-requestconsistently and retain--prfor compatibility.--create-pull-requestas canonical and identify--pras a hidden compatibility alias.