Skip to content

Commit bc85f30

Browse files
author
Ritchie
committed
ci: remove pull_request trigger from Release Drafter workflow
The pull_request trigger caused Release Drafter to fail with: 'Validation Failed: field target_commitish invalid' This happens because on PR events, release-drafter uses refs/pull/N/merge as target_commitish when updating the draft release, which the GitHub Releases API rejects as an invalid ref. The pull_request trigger is only needed for autolabeler functionality, which is currently commented out in the workflow. Removing it fixes the recurring failure while preserving all desired behavior (draft updates happen on push to main).
1 parent 684ee68 commit bc85f30

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/release-drafter.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ on:
55
# branches to consider in the event; optional, defaults to all
66
branches:
77
- main
8-
# pull_request event is required only for autolabeler
9-
pull_request:
10-
# Only following types are handled by the action, but one can default to all as well
11-
types: [opened, reopened, synchronize]
8+
# pull_request event is only needed for autolabeler (currently disabled)
9+
# Removing it prevents the "invalid target_commitish" error when Release Drafter
10+
# tries to use refs/pull/N/merge as a release target, which GitHub rejects.
11+
# pull_request:
12+
# types: [opened, reopened, synchronize]
1213
# pull_request_target event is required for autolabeler to support PRs from forks
1314
# pull_request_target:
1415
# types: [opened, reopened, synchronize]
@@ -31,7 +32,7 @@ jobs:
3132
# run: |
3233
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
3334

34-
# Drafts your next Release notes as Pull Requests are merged into "master"
35+
# Drafts your next Release notes as Pull Requests are merged into "main"
3536
- uses: release-drafter/release-drafter@v7
3637
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
3738
# with:

0 commit comments

Comments
 (0)