Skip to content

Commit aa768a8

Browse files
committed
Fix: Ensure dependencies label on PRs before codegen-agentic-fix pushes
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.
1 parent 257a5bf commit aa768a8

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/codegen-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ jobs:
128128
run: |
129129
ERROR_SUMMARY=$(cat /tmp/error-summary.txt)
130130
131+
# Ensure PR has dependencies label (required by codegen-agentic-fix safe-output)
132+
gh pr edit "$PR_NUMBER" --add-label dependencies
133+
131134
gh workflow run codegen-agentic-fix.lock.yml \
132135
-f branch="$BRANCH" \
133136
-f pr_number="$PR_NUMBER" \

.github/workflows/update-copilot-dependency.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
if gh pr view "$BRANCH" >/dev/null 2>&1; then
148148
echo "Pull request for branch '$BRANCH' already exists; updated branch only."
149149
PR_NUMBER=$(gh pr view "$BRANCH" --json number --jq .number)
150+
gh pr edit "$PR_NUMBER" --add-label dependencies
150151
else
151152
PR_NUMBER=$(gh pr create \
152153
--title "Update @github/copilot to $VERSION" \

0 commit comments

Comments
 (0)