Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat[ci]: add PR title validation #3887

Merged
merged 22 commits into from
Mar 23, 2024
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
54 changes: 54 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# jobs to validate pull request well-formedness

name: Validate PR metadata

on:
pull_request:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
validate-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
name: Run conventional commit checker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/amannn/action-semantic-pull-request?tab=readme-ov-file#configuration
with:
types: |
feat
fix
chore
refactor
# ci: continuous integration
# docs: documentation
# test: test suite
# lang: language changes
# ux: language changes (UX)
# tool: integration
# ir: (old) IR/codegen changes
# venom: venom changes
scopes: |
ci
docs
test
lang
ux
tool
ir
venom
requireScope: true
subjectPattern: '^(?![A-Z]).+$'
subjectPatternError: |
Starts with uppercase letter: '{subject}'
(Full PR title: '{title}')
headerPattern: '^(\w*)(?:\[([\w$.\-*/ ]*)\])?: (.*)$'
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
Loading