Commit 9b49b6f
authored
fix: Skip release-drafter on pull_request events (#264)
## Summary
Release-drafter fails with `Validation Failed:
{"resource":"Release","code":"invalid","field":"target_commitish"}` when
triggered by `pull_request` events. This happens because in the PR
context, the git ref is a temporary merge commit (`refs/pull/N/merge`),
which the GitHub API rejects as an invalid `target_commitish` for a
release.
Fix: add `if: github.event_name == 'push'` to the "Prepare release
notes" step so it only runs on pushes to `main` / tags, where the ref
points to a real branch.1 parent e416abe commit 9b49b6f
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments