Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ jobs:
sudo apt-get install -y clang-format-18
npm ci --ignore-scripts
clang-format-18 --version
- name: Check PR title format
if: github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
node ./scripts/check_pr_title.js
- name: Run checks
run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize, reopened]
branches:
- master

permissions:
contents: read

jobs:
conventional-pr-title:
runs-on: ubuntu-slim

steps:
- name: Validate pull request title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
pattern='^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([[:alnum:]_.-]+\))?(!)?: .+$'

if [[ ! "$PR_TITLE" =~ $pattern ]]; then
echo "PR title must follow Conventional Commits, for example: feat(ui): add route summary"
echo "Got: $PR_TITLE"
exit 1
fi
Loading