Skip to content

Commit

Permalink
Merge pull request #1017 from Infomaniak/pr-title-and-commit-check
Browse files Browse the repository at this point in the history
ci: Add check for PR titles and commit messages
  • Loading branch information
valentinperignon committed Oct 4, 2023
2 parents 1b79c0f + 80c710a commit 0b35d9f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/semantic-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'PR and Commit Message Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize

jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Line Length
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\([\w\-]+\))?: [A-Z0-9].+'
error: 'Commit messages and PR title should match conventional commit convention and start with a majuscule.'
excludeDescription: 'true'
excludeTitle: 'false'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0b35d9f

Please sign in to comment.