Skip to content

Commit da9f91b

Browse files
author
Ritchie
committed
fix(ci): remove pull_request trigger from release-drafter workflow
The pull_request trigger causes release-drafter/release-drafter@v7 to fail with 'Validation Failed: invalid field target_commitish' because it tries to update the draft release using the PR merge ref (refs/pull/N/merge) as the target commitish, which GitHub rejects. Since the autolabeler feature is not in use, the pull_request trigger serves no purpose. Removing it so the workflow only runs on push to main, which is the correct behavior for maintaining the release draft. Fixes recurring failures on PRs: run IDs 23369773059, 23369768998, 23111592904
1 parent 7dd59c8 commit da9f91b

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

.github/workflows/release-drafter.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ 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]
12-
# pull_request_target event is required for autolabeler to support PRs from forks
13-
# pull_request_target:
14-
# types: [opened, reopened, synchronize]
8+
# pull_request trigger removed: causes "invalid target_commitish" errors when
9+
# release-drafter tries to update the draft release with a PR merge ref.
10+
# Autolabeler is not in use; the push trigger is sufficient to keep the draft updated.
1511

1612
permissions:
1713
contents: read
@@ -26,12 +22,7 @@ jobs:
2622
pull-requests: write
2723
runs-on: ubuntu-latest
2824
steps:
29-
# (Optional) GitHub Enterprise requires GHE_HOST variable set
30-
#- name: Set GHE_HOST
31-
# run: |
32-
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33-
34-
# Drafts your next Release notes as Pull Requests are merged into "master"
25+
# Drafts your next Release notes as Pull Requests are merged into "main"
3526
- uses: release-drafter/release-drafter@v7
3627
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
3728
# with:

0 commit comments

Comments
 (0)