CI and the PR title check only ran for pull requests targeting master, so a pull request stacked on another one got no checks, and no CI result gate, until the one below it merged. Both now run for every base. Path classification already diffs against the pull request's own base commit, so a stacked pull request is classified by its own changes.
34 lines
968 B
YAML
34 lines
968 B
YAML
name: PR title
|
|
|
|
on:
|
|
# Every base, so stacked pull requests are checked against the PR below them.
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, edited]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: pr-title-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pr-title:
|
|
name: PR title
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-bun
|
|
- name: Validate PR title
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
COMMITLINT_PR_TITLE: '1'
|
|
run: |
|
|
if ! printf '%s\n' "$PR_TITLE" | bun run check:commits; then
|
|
echo '::error title=PR title::Use a Conventional Commit title, for example fix: preserve selection. See CONTRIBUTING.md#commit-messages.'
|
|
exit 1
|
|
fi
|