Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update
gh aw update --orgto support workflow-targeted updates and repo prefiltering #41617New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update
gh aw update --orgto support workflow-targeted updates and repo prefiltering #41617Changes from all commits
c7cfd630928ceb821aa274a6cf4110400daFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silent fallback to full-org scan when all workflow names normalize to empty: when
workflowNamesis non-empty but every entry reduces to""vianormalizeWorkflowID, the function silently returns the base query — no filename predicates, no warning — causingsearchOrgReposByQueryto scan the entire org.💡 Details and mitigation
Correctness is preserved by the backstop in
previewOrgRepoUpdates: even if the search over-fetches repos,findWorkflowsWithSourcere-filters them usingopts.WorkflowNames. So no wrong updates are applied. The risk is pure API quota waste (an org-wide search instead of a targeted one) with no signal to the caller.This is hard to reach in practice since CLI validation blocks empty names upstream, but it is worth hardening:
A
fmt.Fprintln(os.Stderr, console.FormatWarningMessage("..."))or debug log here would make unexpected fallback observable without blocking the operation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing boundary test for
[]string{}(empty slice) and all-empty-normalization path: the test coversnil, two names, and dedup, but not[]string{}or a slice where every entry normalizes to""(e.g.[]string{""}).💡 Suggested additions
These cases exercise the
if len(filenameFilters) == 0 { return base }guard at line 62, which is the silent-fallback path discussed in the adjacent comment.Uh oh!
There was an error while loading. Please reload this page.