Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/weekly-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
if: needs.check-updates.outputs.has-updates == 'true' && inputs.dry-run != true
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
pull-requests: write
steps:
Expand Down Expand Up @@ -293,6 +294,17 @@ jobs:
--head "$BRANCH_NAME" \
--base main

# Events triggered by GITHUB_TOKEN don't create new workflow runs,
# with the exception of workflow_dispatch and repository_dispatch.
# Use workflow_dispatch to trigger CI on the newly pushed branch.
- name: Trigger CI checks
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Close/reopen with GITHUB_TOKEN won't trigger workflows

High Severity

The "Trigger CI checks" step uses GH_TOKEN: ${{ github.token }} (the GITHUB_TOKEN) to close and reopen the PR. However, GitHub's documentation states that events triggered by the GITHUB_TOKEN — including pull_request.reopened — will not create new workflow runs. This is the exact same limitation the comment on line 296 describes for pushes. The close/reopen cycle will succeed but the resulting event will be silently ignored, so the required CI checks will still never be triggered. A PAT or GitHub App installation token is needed instead.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 147375f. Configure here.

BRANCH_NAME: ${{ steps.branch.outputs.branch }}
run: |
gh workflow run ci.yml --ref "$BRANCH_NAME"

- name: Add job summary
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
env:
Expand Down