Skip to content
Merged
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
46 changes: 46 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint PR title

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
pull-requests: read

jobs:
lint:
name: Conventional commit title
runs-on: ubuntu-latest
steps:
- name: Lint PR title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Conventional commit types accepted in titles. Mirrors the set the
# PR labeler recognizes in .github/workflows/labeler.yml.
types: |
feat
fix
perf
refactor
revert
docs
ci
build
chore
test
style
# Subject must start lowercase and not end with a period.
subjectPattern: ^(?![A-Z])(?!.*\.$).+$
subjectPatternError: |
The subject "{subject}" found in "{title}" must start with a
lowercase letter and must not end with a period.
Loading