Skip to content

Commit 02a0079

Browse files
author
Ritchie
committed
fix(ci): remove pull_request trigger from release-drafter workflow
The release-drafter was triggering on every PR open/sync, which caused a 'Validation Failed: invalid target_commitish' error because refs/pull/*/merge is not a valid target for updating a release draft. The autolabeler feature is not configured (commented out), so the pull_request trigger served no purpose. Removing it so the workflow only runs on pushes to main, which is the intended behavior. Fixes: 'Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}'
1 parent 7b891bf commit 02a0079

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

.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: autolabeler is not configured,
9+
# and running on PRs causes "invalid target_commitish" errors
10+
# because refs/pull/*/merge cannot be used as a release target.
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)