Skip to content

Fix: Ensure dependencies label on PRs before codegen-agentic-fix pushes#206

Merged
edburns merged 1 commit into
github:mainfrom
edburns:edburns/agentic-fix-dependencies-label
May 16, 2026
Merged

Fix: Ensure dependencies label on PRs before codegen-agentic-fix pushes#206
edburns merged 1 commit into
github:mainfrom
edburns:edburns/agentic-fix-dependencies-label

Conversation

@edburns
Copy link
Copy Markdown
Collaborator

@edburns edburns commented May 16, 2026

Fixes #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.

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.
Copilot AI review requested due to automatic review settings May 16, 2026 00:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dependencies when update-copilot-dependency.yml reuses an existing PR for an already-existing update branch.
  • Add a dependencies label enforcement step in codegen-check.yml right before dispatching codegen-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

@edburns edburns merged commit 50ad8c7 into github:main May 16, 2026
5 checks passed
@edburns edburns deleted the edburns/agentic-fix-dependencies-label branch May 16, 2026 00:21
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.

[aw] Codegen Agentic Fix failed

2 participants