Skip to content

Commit 48a066a

Browse files
ElanHassonclaude
andauthored
Fix release-drafter silent failure on PR events (#42)
The release-drafter v6 action was failing silently on pull_request events because it tried to query commit history using `refs/pull/XX/merge` as the target commitish, which the GraphQL API cannot resolve. Changes: - Remove duplicate `pull_request` event (keep only `pull_request_target`) - Add `disable-releaser` condition to skip release drafting on PR events Now: - push to main: Full release drafting runs - pull_request_target: Only autolabeler runs (no GraphQL query failure) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a42e9d1 commit 48a066a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release-drafter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
types: [opened, reopened, synchronize]
97
pull_request_target:
108
types: [opened, reopened, synchronize]
119

@@ -22,5 +20,8 @@ jobs:
2220
- uses: release-drafter/release-drafter@v6
2321
with:
2422
config-name: release-drafter.yml
23+
# Only run release drafting on push to main, not on PR events
24+
# PR events only run the autolabeler
25+
disable-releaser: ${{ github.event_name == 'pull_request_target' }}
2526
env:
2627
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)