Fix: Ensure dependencies label on PRs before codegen-agentic-fix pushes#206
Merged
edburns merged 1 commit intoMay 16, 2026
Merged
Conversation
Fixes github#199 The codegen-agentic-fix workflow's push-to-pull-request-branch safe-output requires the target PR to have the `dependencies` label. Two gaps allowed PRs to reach the agentic fix without this label: 1. update-copilot-dependency.yml: When the PR branch already exists from a prior run, the workflow reused it without adding the label. Now calls `gh pr edit --add-label dependencies` in that path. 2. codegen-check.yml: When triggering the agentic fix from any PR that touches codegen paths, the PR might not have the label (e.g., a manual PR or one created before the fix). Now ensures the label is present before dispatching codegen-agentic-fix.lock.yml.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a workflow reliability gap in the Java Copilot SDK repo by ensuring pull requests have the dependencies label before triggering codegen-agentic-fix, whose push-to-pull-request-branch safe-output requires that label.
Changes:
- Add
gh pr edit --add-label dependencieswhenupdate-copilot-dependency.ymlreuses an existing PR for an already-existing update branch. - Add a
dependencieslabel enforcement step incodegen-check.ymlright before dispatchingcodegen-agentic-fix.lock.yml.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/update-copilot-dependency.yml | Ensures existing “update @github/copilot” PRs are labeled dependencies when the branch/PR already exists. |
| .github/workflows/codegen-check.yml | Ensures any PR that triggers agentic fix from codegen-check is labeled dependencies before dispatching the agentic workflow. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #199
The codegen-agentic-fix workflow's push-to-pull-request-branch safe-output requires the target PR to have the
dependencieslabel. Two gaps allowed PRs to reach the agentic fix without this label:update-copilot-dependency.yml: When the PR branch already exists from a prior run, the workflow reused it without adding the label. Now calls
gh pr edit --add-label dependenciesin that path.codegen-check.yml: When triggering the agentic fix from any PR that touches codegen paths, the PR might not have the label (e.g., a manual PR or one created before the fix). Now ensures the label is present before dispatching codegen-agentic-fix.lock.yml.