File tree Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ npx commitlint --edit $1
Original file line number Diff line number Diff line change
1
+ name : Lint Commit Messages
2
+ on : [pull_request]
3
+
4
+ permissions :
5
+ pull-requests : write
6
+ jobs :
7
+ commitlint :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v3
11
+ with :
12
+ fetch-depth : 0
13
+ - uses : wagoid/commitlint-github-action@456526eec71276a59e74aafdfe06a9632ac2eee1
14
+ id : commitlint
15
+ - if : ${{ failure() && steps.commitlint.outcome == 'failure' }}
16
+ uses : marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
17
+ with :
18
+ header : Commitlint
19
+ recreate : true
20
+ message : |
21
+ ## Wrong commit message format detected
22
+ We use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) in our project.
23
+
24
+ > **Warning**
25
+ > Probably you forgot to activate local git hooks.
26
+
27
+ Run the next command in the project root to activate local hooks:
28
+ ```sh
29
+ sh ./scripts/install_hooks.sh
30
+ ```
31
+
32
+ More info you can find in [job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
33
+ - if : ${{ success() }}
34
+ uses : marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
35
+ with :
36
+ header : Commitlint
37
+ hide : true
38
+ hide_classify : " OUTDATED"
Original file line number Diff line number Diff line change
1
+ module . exports = { extends : [ '@commitlint/config-conventional' ] } ;
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Make .git_hooks folder as hooks source for git
4
+ git config core.hooksPath .git_hooks/
5
+
6
+ # install commitlint and @commitlint/config-conventional globally
7
+ npm install -g commitlint @commitlint/config-conventional
You can’t perform that action at this time.
0 commit comments