Skip to content

Commit

Permalink
ci: Expand PR title validation triggers (#30)
Browse files Browse the repository at this point in the history
Force-pushes from automated PRs (like release-please) do not seem to
trigger any of the normal PR triggers (opened, edited, synchronize).
In fact, even an exhaustive list of types will not work.  So here we
add triggers for reviews, so that the validation will run after
someone approves such a PR.  This is critical since this is a required
status check in most of our repos.  If the workflow doesn't run, the
release PR can't be merged.
  • Loading branch information
joeyparrish authored Feb 14, 2022
1 parent 51fb4f7 commit f7a4572
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/validate-pr-title.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: "Validate PR Title"

on:
# NOTE: Force-pushes from automated PRs (like release-please) do not seem to
# trigger any of the normal PR triggers (opened, edited, synchronize). In
# fact, even an exhaustive list of types will not work. So here we add
# triggers for reviews, so that the validation will run after someone
# approves such a PR. This is critical since this is a required status check
# in most of our repos. If it doesn't run, the PR can't be merged.
pull_request_target:
types:
- opened
- edited
- synchronize
pull_request_review:

jobs:
main:
Expand Down

0 comments on commit f7a4572

Please sign in to comment.