Add gh aw update --repo support with isolated shallow checkout and target-repo PR flow#32213
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
gh aw update --repo support with shallow target checkoutgh aw update --repo support with isolated shallow checkout and target-repo PR flow
There was a problem hiding this comment.
Pull request overview
Adds gh aw update --repo support to run workflow updates against a target repository checkout and optionally create a PR there.
Changes:
- Registers
--repo/-rforupdateand documents it in help/examples. - Adds target-repo update flow using a shallow
gh repo cloneunder.github/aw/updates. - Adds integration assertions for help text and flag recognition.
Show a summary per file
| File | Description |
|---|---|
pkg/cli/update_command.go |
Adds target repository checkout/update/PR flow and checkout gitignore handling. |
pkg/cli/update_integration_test.go |
Extends update command integration coverage for --repo. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
| checkoutDir := filepath.Join(updatesDir, sanitizeRepoPath(targetRepo)) | ||
| if err := shallowCloneTargetRepo(ctx, targetRepo, checkoutDir); err != nil { |
| assert.Contains(t, outputStr, "no-merge", "Help should document --no-merge flag") | ||
| assert.Contains(t, outputStr, "no-redirect", "Help should document --no-redirect flag") | ||
| assert.Contains(t, outputStr, "disable-security-scanner", "Help should document --disable-security-scanner flag") | ||
| assert.Contains(t, outputStr, "repo", "Help should document --repo flag") |
|
|
|
@copilot add ci integration test job that run |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in
|
|
pr-sous-chef run: https://github.com/github/gh-aw/actions/runs/25889685241
|
|
@copilot merge main and recompile |
…d-repo-support # Conflicts: # .github/workflows/daily-cache-strategy-analyzer.lock.yml # .github/workflows/daily-fact.lock.yml # .github/workflows/daily-observability-report.lock.yml # .github/workflows/duplicate-code-detector.lock.yml # .github/workflows/grumpy-reviewer.lock.yml # .github/workflows/issue-arborist.lock.yml # .github/workflows/necromancer.lock.yml # .github/workflows/pr-sous-chef.lock.yml # .github/workflows/schema-feature-coverage.lock.yml # .github/workflows/smoke-call-workflow.lock.yml # .github/workflows/smoke-codex.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
updatepreviously operated only on the current repository. This change adds cross-repository targeting so updates can be applied to another repo via--repo, using an isolated checkout under.github/aw/updates, with optional PR creation in that target repo.CLI surface
--repo/-rtogh aw update.--pr/--create-pull-requestbehavior, now supported in target-repo mode.Target-repo execution model
--repo owner/repo, performs a shallow clone (--depth=1) into:.github/aw/updates/<sanitized-repo-id>Ignored workspace for transient checkouts
.github/aw/updates/.gitignoreexists and ignores all checkout contents while preserving the.gitignorefile itself.PR creation in target repo
--repomode with--pr, creates the PR from the cloned target repository (not the caller repo), using the existing PR helper flow.Integration coverage
--repoin command help and validates flag recognition path.pr-sous-chef: attempted branch update (update_branch=true) from workflow run 25885271535
pr-sous-chef: automated branch update attempt — run: https://github.com/github/gh-aw/actions/runs/25886945106