Skip to content

Commit 89afd1c

Browse files
committed
fix: remove GH_AW_CI_TRIGGER_TOKEN; re-trigger CI via PR_BOT instead
- Remove github-token-for-extra-empty-commit from fix-renovate-tests.md (avoids needing a new long-lived PAT in the org) - Add retrigger-ci-after-copilot-fix.yml: fires on pull_request:unlabeled for 'renovate-fix-needed'; uses existing PR_BOT_GITHUB_TOKEN app to push an empty commit that triggers CI on the renovate-agent branch - Fix promote-renovate-pr.yml: workflow name was 'Continuous Integration Testing' but actual name in test.yaml is 'Python tests'
1 parent 4bfba86 commit 89afd1c

3 files changed

Lines changed: 45 additions & 5 deletions

File tree

.github/workflows/fix-renovate-tests.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ safe-outputs:
2424
target: "*"
2525
title-prefix: "[renovate-agent]"
2626
labels: [renovate-fix-needed]
27-
github-token-for-extra-empty-commit: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }}
2827
protected-files: blocked
2928
remove-labels:
3029
allowed: [renovate-fix-needed]
@@ -98,11 +97,11 @@ Use `cat`, `grep`, and `find` to explore the repository before editing.
9897
### 5. Push your fixes
9998

10099
After making all edits, push them to the PR branch using
101-
`push-to-pull-request-branch`. The `github-token-for-extra-empty-commit`
102-
is configured, so CI will trigger automatically on your push.
100+
`push-to-pull-request-branch`.
103101

104102
Then remove the `renovate-fix-needed` label from the PR using `remove-labels`
105-
to signal that the fix has been applied.
103+
to signal that the fix has been applied. A separate workflow will detect the
104+
label removal and push an empty commit to re-trigger CI.
106105

107106
### 6. If no action is needed
108107

.github/workflows/promote-renovate-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name: Promote Renovate Draft PR
1212
on:
1313
workflow_run:
1414
workflows:
15-
- "Continuous Integration Testing"
15+
- "Python tests"
1616
- "Continuous Integration Testing (prod feature flags)"
1717
types: [completed]
1818
branches:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Re-trigger CI after Copilot fix
2+
3+
# When the gh-aw agentic workflow (fix-renovate-tests) pushes a code fix, it
4+
# removes the "renovate-fix-needed" label to signal completion. Because
5+
# pushes made by GitHub Actions use GITHUB_TOKEN (which cannot trigger other
6+
# workflow runs), this workflow fires on that label removal and pushes an
7+
# empty commit via the Notify PR Bot — whose pushes DO trigger CI.
8+
9+
on:
10+
pull_request:
11+
types: [unlabeled]
12+
branches:
13+
- "renovate-agent/**"
14+
15+
jobs:
16+
retrigger:
17+
name: Push empty commit to re-trigger CI
18+
runs-on: ubuntu-latest
19+
# Only act when the removed label is the agentic-workflow signal label
20+
if: github.event.label.name == 'renovate-fix-needed'
21+
22+
steps:
23+
- name: Obtain a Notify PR Bot GitHub App Installation Access Token
24+
run: |
25+
TOKEN="$(npx --yes obtain-github-app-installation-access-token@1.1.0 ci ${{ secrets.PR_BOT_GITHUB_TOKEN }})"
26+
echo "::add-mask::$TOKEN"
27+
echo "BOT_TOKEN=$TOKEN" >> $GITHUB_ENV
28+
29+
- name: Checkout PR branch
30+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
31+
with:
32+
token: ${{ env.BOT_TOKEN }}
33+
ref: ${{ github.head_ref }}
34+
fetch-depth: 1
35+
36+
- name: Push empty commit to trigger CI
37+
run: |
38+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+
git config user.name "Notify PR Bot"
40+
git commit --allow-empty -m "chore: trigger CI after Copilot fix [skip changelog]"
41+
git push

0 commit comments

Comments
 (0)