From a549933e6ea43da8748ea928e491e96d3331e795 Mon Sep 17 00:00:00 2001 From: Elan Hasson <234704+ElanHasson@users.noreply.github.com> Date: Sun, 21 Dec 2025 16:15:55 -0500 Subject: [PATCH] Fix release-drafter silent failure on PR events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/release-drafter.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index a31a1a9..8656f82 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,8 +4,6 @@ on: push: branches: - main - pull_request: - types: [opened, reopened, synchronize] pull_request_target: types: [opened, reopened, synchronize] @@ -22,5 +20,8 @@ jobs: - uses: release-drafter/release-drafter@v6 with: config-name: release-drafter.yml + # Only run release drafting on push to main, not on PR events + # PR events only run the autolabeler + disable-releaser: ${{ github.event_name == 'pull_request_target' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file