Skip to content

Commit 49e6c07

Browse files
committed
ci: unblock changesets release PRs
Two problems were blocking the v4.5.0-rc.0 release PR (and would block every future release PR): 1. The changesets bot pushes commits authored by GITHUB_TOKEN, which by GitHub design cannot trigger downstream workflows. That leaves the required "All PR Checks" status permanently Expected. Self-report a success check from changesets-pr.yml after PR creation. If a human ever pushes to changeset-release/main, the real pr_checks.yml fires and its result overwrites the auto-success (last write wins for the same context on the same SHA). 2. vouch-check-pr.yml's require-draft job auto-closed any non-draft PR from authors with author_association != MEMBER/OWNER/COLLABORATOR, exempting only devin-ai-integration[bot] and dependabot[bot]. The changesets bot publishes as github-actions[bot] (CONTRIBUTOR) and was getting slammed shut on reopen. Add it to the exemption list.
1 parent 9ff410b commit 49e6c07

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/changesets-pr.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
permissions:
2323
contents: write
2424
pull-requests: write
25+
checks: write
2526
if: github.repository == 'triggerdotdev/trigger.dev'
2627
steps:
2728
- name: Checkout
@@ -72,3 +73,27 @@ jobs:
7273
-f body="$ENHANCED_BODY"
7374
fi
7475
fi
76+
77+
# The changesets bot authors release PRs with GITHUB_TOKEN, which by GitHub
78+
# design cannot trigger downstream workflows. That leaves the required
79+
# "All PR Checks" status permanently Expected and the PR unmergeable.
80+
# The release PR only bumps package.json + lockfile + CHANGELOGs from
81+
# changesets already on main, so we self-report the required check as
82+
# success. If a human ever pushes to changeset-release/main, the real
83+
# pr_checks.yml fires and its result overwrites this one (last write wins
84+
# for the same context on the same SHA).
85+
- name: Self-report "All PR Checks" success on release PR
86+
if: steps.changesets.outputs.published != 'true'
87+
env:
88+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
run: |
90+
PR_NUMBER=$(gh pr list --head changeset-release/main --json number --jq '.[0].number')
91+
if [ -z "$PR_NUMBER" ]; then exit 0; fi
92+
HEAD_SHA=$(gh pr view "$PR_NUMBER" --json headRefOid --jq '.headRefOid')
93+
gh api -X POST repos/${{ github.repository }}/check-runs \
94+
-f name="All PR Checks" \
95+
-f head_sha="$HEAD_SHA" \
96+
-f status=completed \
97+
-f conclusion=success \
98+
-f 'output[title]=Auto-pass for changeset release PR' \
99+
-f 'output[summary]=Required check auto-satisfied for `changeset-release/main` PRs. Full CI ran on the underlying commits before they landed on main.'

.github/workflows/vouch-check-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
github.event.pull_request.author_association != 'OWNER' &&
3333
github.event.pull_request.author_association != 'COLLABORATOR' &&
3434
github.event.pull_request.user.login != 'devin-ai-integration[bot]' &&
35-
github.event.pull_request.user.login != 'dependabot[bot]'
35+
github.event.pull_request.user.login != 'dependabot[bot]' &&
36+
github.event.pull_request.user.login != 'github-actions[bot]'
3637
runs-on: ubuntu-latest
3738
steps:
3839
- name: Close non-draft PR

0 commit comments

Comments
 (0)