Skip to content
Closed
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions .github/workflows/weekly-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,21 @@ jobs:
--head "$BRANCH_NAME" \
--base main

# Pushes made with GITHUB_TOKEN don't trigger other workflows.
# Close/reopen the PR to generate a pull_request.reopened event,
# which triggers required CI and enterprise audit workflows.
- 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: |
pr_number=$(gh pr list --head "$BRANCH_NAME" --json number --jq '.[0].number')
if [ -n "$pr_number" ]; then
gh pr close "$pr_number"
gh pr reopen "$pr_number"
fi

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