-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7086d98
commit 779d360
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: PR Title Linter | ||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, unlocked] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Install commitlint | ||
run: | | ||
npm install @commitlint/config-conventional | ||
npm install commitlint@latest | ||
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js | ||
- name: "Lint: Pull request title" | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
run: echo $PR_TITLE | npx commitlint | ||
|
||
- name: "Warning: Pull request title must match patterns defined in CONTRIBUTING.md in section Commit Message Guidelines!" | ||
if: ${{ failure() }} | ||
run: echo "Pull request title must match patterns defined in CONTRIBUTING.md in section Commit Message Guidelines!" |