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
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,12 @@ on:
branches:
- main
pull_request:
types: [opened, edited, synchronize, reopened]
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Validate Conventional Commit title
if: github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash
run: |
pattern='^[a-z][a-z0-9-]*(\([^()]+\))?(!)?: .+'
if [[ ! $PR_TITLE =~ $pattern ]]; then
echo "Pull request titles must use Conventional Commit syntax." >&2
echo "Examples: feat: add a feature, fix(api): correct behavior, feat!: break compatibility" >&2
exit 1
fi
- uses: useblacksmith/checkout@v1
- uses: dtolnay/rust-toolchain@master
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pr-title

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
pr-title:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Validate Conventional Commit title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash
run: |
pattern='^[a-z][a-z0-9-]*(\([^()]+\))?(!)?: .+'
if [[ ! $PR_TITLE =~ $pattern ]]; then
echo "Pull request titles must use Conventional Commit syntax." >&2
echo "Examples: feat: add a feature, fix(api): correct behavior, feat!: break compatibility" >&2
exit 1
fi
Loading