File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,16 +135,16 @@ jobs:
135135 GITHUB_TOKEN : ${{ github.token }}
136136 EXCLUDE_COMMIT : ${{ github.event.after }}
137137 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
138141 - name : Set base sha
139142 if : github.event_name == 'pull_request'
140143 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
143146 env :
144147 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
148148 - name : Get changes
149149 id : get-changes
150150 if : github.event_name == 'pull_request'
You can’t perform that action at this time.
0 commit comments