Skip to content

Commit

Permalink
build: Add github workflow to check commit message format
Browse files Browse the repository at this point in the history
Adds automation to confirm the commit messages align with the contributing guidelines.

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
  • Loading branch information
pjbgf committed Oct 9, 2023
1 parent 771a3eb commit 1a73661
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'PR Validation'

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

permissions:
contents: read

jobs:
check-commit-message:
name: Check Commit Messages
runs-on: ubuntu-latest
steps:
- name: Check Package Prefix
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(\*|plumbing|utils|config|_examples|internal|storage|cli|build): .+'
error: |
Commit message(s) does not align with contribution acceptance criteria.
Refer to https://github.com/go-git/go-git/blob/master/CONTRIBUTING.md#format-of-the-commit-message for more information.
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1a73661

Please sign in to comment.