Skip to content

[WIP] Update gh aw commands to support both flags#11914

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/add-support-for-both-flags
Closed

[WIP] Update gh aw commands to support both flags#11914
Copilot wants to merge 2 commits intomainfrom
copilot/add-support-for-both-flags

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

Adding --push and --create-pull-request flags to both commands

Implementation Complete

  • Explored repository structure
  • Found add_command.go has --create-pull-request flag
  • Found init_command.go has --push flag
  • Identified helper functions in git.go for commit/push operations
  • Identified PR creation function addWorkflowsWithPR in add_command.go
  • Add --push flag to gh aw add command
    • Update flag definition in NewAddCommand()
    • Pass push parameter to AddWorkflows function
    • Add push logic to addWorkflowsNormal function
    • Ensure push and create-pull-request are mutually exclusive
  • Add --create-pull-request flag to gh aw init command
    • Update flag definition in NewInitCommand()
    • Pass createPR parameter to InitRepository function
    • Add PR creation logic similar to add command
    • Ensure push and create-pull-request are mutually exclusive
  • Update tests
    • Add test for --push flag in add_command_test.go
    • Add test for --create-pull-request flag in init_command_test.go
    • Fix all test files with updated function signatures
  • Manual testing
    • Test gh aw add with --push flag
    • Test gh aw init with --create-pull-request flag
    • Test error cases (both flags together, etc.)
  • Run validation
    • Run make agent-finish before committing
Original prompt

This section details on the original issue you should resolve

<issue_title>The gh aw add has --create-pull-request, while gh aw init has --push. Both should support both flags.</issue_title>
<issue_description>gh aw add has --create-pull-request

gh aw init has --push

Both commands should support both flags.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@pelikhan
Copy link
Contributor

@copilot remove "--push" and instead support "--create-pull-request" in both commands

Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
@pelikhan pelikhan closed this Jan 26, 2026
Copilot AI requested a review from dsyme January 26, 2026 17:42
Copilot stopped work on behalf of dsyme due to an error January 26, 2026 17:42
@pelikhan pelikhan reopened this Jan 26, 2026
@pelikhan
Copy link
Contributor

Restrated at #11916

@pelikhan pelikhan closed this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The gh aw add has --create-pull-request, while gh aw init has --push. Both should support both flags.

3 participants