Commit e938f60 1 parent 7b5f29e commit e938f60 Copy full SHA for e938f60
File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 33
33
- name : Check commit message compliance of the pull request
34
34
if : github.event_name == 'pull_request'
35
35
run : |
36
- ./run-tests.sh --check-commitlint ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} ${{ github.event.pull_request.head.sha }}
36
+ ./run-tests.sh --check-commitlint ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.number }}
37
37
38
38
lint-shellcheck :
39
39
runs-on : ubuntu-20.04
Original file line number Diff line number Diff line change @@ -12,13 +12,14 @@ set -o nounset
12
12
check_commitlint () {
13
13
from=${2:- master}
14
14
to=${3:- HEAD}
15
+ pr=${4:- [0-9]+}
15
16
npx commitlint --from=" $from " --to=" $to "
16
17
found=0
17
18
while IFS= read -r line; do
18
- if echo " $line " | grep -qP " \(\#[0-9]+ \)$" ; then
19
+ if echo " $line " | grep -qP " \(\#$pr \)$" ; then
19
20
true
20
21
else
21
- echo " ✖ PR number missing in $line "
22
+ echo " ✖ Headline does not end by '(# $pr )' PR number: $line "
22
23
found=1
23
24
fi
24
25
done < <( git log " $from ..$to " --format=" %s" )
You can’t perform that action at this time.
0 commit comments