mirror of
https://github.com/Heretek-AI/awesome-opencode.git
synced 2026-11-07 02:35:58 -10:00
fix(ci): diff PRs against the current base branch
pull_request.base.sha is the base commit from when an older PR was opened, so validate counted everything merged to main since then (README.md, dist/registry.json, other entries) as part of the PR and failed it. Use origin/<base ref>, whose merge base with the PR merge commit is the current base tip. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
47e84ca97a
commit
40963322da
1 file changed
+3
-1
@@ -40,7 +40,9 @@ jobs:
|
||||
- name: Check catalog changes
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
BASE_REF: ${{ github.event.pull_request.base.sha || 'origin/main' }}
|
||||
# Compare against the current base branch, not pull_request.base.sha: on an older PR that is the base
|
||||
# commit from when the PR was opened, which would count everything merged since as part of the PR
|
||||
BASE_REF: origin/${{ github.event.pull_request.base.ref || 'main' }}
|
||||
# Only the README bot's own PRs (opened by github-actions[bot] from this repo's bot/readme-* branches)
|
||||
# may change the generated files
|
||||
ALLOW_GENERATED: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'github-actions[bot]' && github.event.pull_request.head.repo.full_name == github.repository && startsWith(github.head_ref, 'bot/readme-') }}
|
||||
|
||||
Reference in new issue
Block a user