Skip to content

test: route every handler test through the shared helpers and fixtures #11

test: route every handler test through the shared helpers and fixtures

test: route every handler test through the shared helpers and fixtures #11

Workflow file for this run

name: PR title
# Squash merging makes the PR title the commit subject on main, and release.yml
# picks the version from those subjects, so the title must be a conventional commit.
on:
pull_request:
types: [opened, edited, reopened, synchronize]
permissions: {}
jobs:
conventional-title:
runs-on: ubuntu-latest
steps:
- name: Check the title is a conventional commit
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
set -euo pipefail
TYPES='feat|fix|perf|refactor|docs|test|build|ci|chore|revert|style'
if grep -qE "^(${TYPES})(\([a-z0-9._/-]+\))?!?: [^[:space:]]" <<<"$TITLE"; then
echo "Conventional: $TITLE"
else
echo "::error title=PR title is not a conventional commit::Use '<type>[(scope)][!]: <summary>' with type one of ${TYPES//|/, }. feat releases a minor, fix and perf a patch, and '!' a major; other types don't release."
exit 1
fi