aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-10-09 23:08:03 +0100
committerGitHub <noreply@github.com>2023-10-09 23:08:03 +0100
commite61537e80cfa474cb1cfe63f7210e3dcca5248fe (patch)
tree52bb6c5a1dad98aa20e549b7634e2426ca74875d
parent771a3eb05b2937496910bc2c2cf4c61ccb5df010 (diff)
parent1a73661645a39169763648825f4964d0794bef26 (diff)
downloadgo-git-e61537e80cfa474cb1cfe63f7210e3dcca5248fe.tar.gz
Merge pull request #867 from pjbgf/commit-checker
build: Add github workflow to check commit message format
-rw-r--r--.github/workflows/pr-validation.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
new file mode 100644
index 0000000..04e7046
--- /dev/null
+++ b/.github/workflows/pr-validation.yml
@@ -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 }}