From 4ec4c7d49bd2d99c99c77f9c6aadbe7920a209bb Mon Sep 17 00:00:00 2001 From: Philippe Matray Date: Tue, 2 Jun 2026 14:26:10 +0200 Subject: [PATCH] fix(ci): skip release-draft update on pull_request events Release Drafter fails on every PR with "Validation Failed: target_commitish" because it tries to use refs/pull/NNN/merge as the release target. Gate the update_release_draft job with `if: github.event_name == 'push'` so it only runs on pushes to the default branch, while keeping the pull_request trigger so the autolabeler can be enabled later. Cherry-picks only the workflow fix from #161 (which was based on a stale main and carried unrelated changes). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release-drafter.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 488b261..f9487ee 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -25,6 +25,10 @@ jobs: # otherwise, read permission is required at least pull-requests: write runs-on: ubuntu-latest + # Only update the release draft on push to main, not on pull_request events. + # Running on PRs causes "Validation Failed: target_commitish" because + # release-drafter tries to set refs/pull/NNN/merge as the release target. + if: github.event_name == 'push' steps: # (Optional) GitHub Enterprise requires GHE_HOST variable set #- name: Set GHE_HOST