We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5aa7864 commit 43886d0Copy full SHA for 43886d0
.github/workflows/check.yml
@@ -14,3 +14,19 @@ jobs:
14
run: |
15
npm ci
16
npm test
17
+
18
+ conventional-commits:
19
+ name: Semantic Pull Request
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: validate
23
+ uses: actions/github-script@v6
24
+ with:
25
+ script: |
26
+ // See https://gist.github.com/marcojahn/482410b728c31b221b70ea6d2c433f0c#file-conventional-commit-regex-md
27
+ const regex = /^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)/g;
28
+ const pr = context.payload.pull_request;
29
+ const title = pr.title;
30
+ if (title.match(regex) == null) {
31
+ throw `PR title "${title}"" does not match conventional commits from https://www.conventionalcommits.org/en/v1.0.0/`
32
+ }
0 commit comments