File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,16 +135,16 @@ jobs:
135
135
GITHUB_TOKEN : ${{ github.token }}
136
136
EXCLUDE_COMMIT : ${{ github.event.after }}
137
137
run : python3 -u ci_changes_per_commit.py
138
+ - name : Set head sha
139
+ if : github.event_name == 'pull_request'
140
+ run : echo "HEAD_SHA=$(git show -s --format=%s $GITHUB_SHA | grep -o -P "(?<=Merge ).*(?= into)")" >> $GITHUB_ENV
138
141
- name : Set base sha
139
142
if : github.event_name == 'pull_request'
140
143
run : |
141
- DEEPEN=$((DEPTH - $( git rev-list HEAD --count))) && if((DEEPEN > 0)); then git fetch --no-tags --recurse-submodules=no --deepen=$DEEPEN; fi
142
- echo "BASE_SHA=$(git rev-list $GITHUB_SHA --skip=$(( DEPTH + 1)) --max-count=1)" >> $GITHUB_ENV
144
+ git fetch --no-tags --no- recurse-submodules --depth=$((DEPTH + 1)) origin $HEAD_SHA
145
+ echo "BASE_SHA=$(git rev-list $HEAD_SHA --skip=$DEPTH --max-count=1)" >> $GITHUB_ENV
143
146
env :
144
147
DEPTH : ${{ steps.get-last-commit-with-checks.outputs.commit_depth || github.event.pull_request.commits }}
145
- - name : Set head sha
146
- if : github.event_name == 'pull_request'
147
- run : echo "HEAD_SHA=$(git rev-list $GITHUB_SHA --skip=1 --max-count=1)" >> $GITHUB_ENV
148
148
- name : Get changes
149
149
id : get-changes
150
150
if : github.event_name == 'pull_request'
You can’t perform that action at this time.
0 commit comments