File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 19
19
id : vars
20
20
run : |
21
21
BASE="${{ github.event.pull_request.base.ref }}"
22
- HEAD="${{ github.event.pull_request.head.ref }}"
23
22
echo "BASE=$BASE" >> $GITHUB_ENV
24
- echo "HEAD=$HEAD" >> $GITHUB_ENV
25
23
VERSION="${BASE#stable/}"
26
24
echo "prefix=[$VERSION]" >> $GITHUB_OUTPUT
27
25
@@ -35,15 +33,15 @@ jobs:
35
33
fi
36
34
echo "✅ PR title has the required prefix."
37
35
38
- - name : Fetch base and head branches
36
+ - name : Fetch relevant branches
39
37
run : |
40
- git fetch origin $BASE
41
- git fetch origin $HEAD
38
+ git fetch origin $BASE:base
39
+ git fetch origin pull/${{ github.event.pull_request.number }}/head:pr
42
40
43
41
- name : Check commit messages prefix
44
42
run : |
45
43
PREFIX="${{ steps.vars.outputs.prefix }}"
46
- COMMITS=$(git rev-list origin/${BASE}..origin/${HEAD} )
44
+ COMMITS=$(git rev-list base..pr )
47
45
echo "Checking commit messages for required prefix: $PREFIX"
48
46
FAIL=0
49
47
for SHA in $COMMITS; do
You can’t perform that action at this time.
0 commit comments