99 steps :
1010 - uses : actions/checkout@v2
1111 with :
12- ref : ${{ github.event.pull_request_target .head.sha }}
12+ ref : ${{ github.event.pull_request .head.sha }}
1313 - name : Run clang format
1414 id : clang_format
1515 env :
1616 ALIBUILD_GITHUB_TOKEN : ${{secrets.ALIBUILD_GITHUB_TOKEN}}
1717 run : |
1818 set -x
1919 # We need to fetch the other commit.
20- git fetch --depth=1 origin ${{ github.event.pull_request_target .base.ref }}
21- git fetch --depth=1 origin pull/${{ github.event.pull_request_target .number }}/head:${{ github.event.pull_request_target .head.ref }}
20+ git fetch --depth=1 origin ${{ github.event.pull_request .base.ref }}
21+ git fetch --depth=1 origin pull/${{ github.event.pull_request .number }}/head:${{ github.event.pull_request .head.ref }}
2222
2323 # We create a new branch which we will use for the eventual PR.
2424 git config --global user.email "alibuild@cern.ch"
2525 git config --global user.name "ALICE Action Bot"
26- git checkout -b alibot-cleanup-${{ github.event.pull_request_target .number }} ${{ github.event.pull_request_target .head.sha }}
26+ git checkout -b alibot-cleanup-${{ github.event.pull_request .number }} ${{ github.event.pull_request .head.sha }}
2727
28- BASE_COMMIT=${{ github.event.pull_request_target .base.sha }}
29- echo "Running clang-format-8 against branch ${{ github.event.pull_request_target .base.ref }} , with hash ${{ github.event.pull_request_target .base.sha }}"
28+ BASE_COMMIT=${{ github.event.pull_request .base.sha }}
29+ echo "Running clang-format-8 against branch ${{ github.event.pull_request .base.ref }} , with hash ${{ github.event.pull_request .base.sha }}"
3030 COMMIT_FILES=$(git diff --name-only $BASE_COMMIT | grep -ivE 'LinkDef|Utilities/PCG/')
3131 RESULT_OUTPUT="$(git-clang-format-8 --commit $BASE_COMMIT --diff --binary `which clang-format-8` $COMMIT_FILES)"
3232 git-clang-format-8 --commit $BASE_COMMIT \
5252 if [ "$RESULT_OUTPUT" == "no modified files to format" ] \
5353 || [ "$RESULT_OUTPUT" == "clang-format did not modify any files" ] ; then
5454 echo "clang-format passed."
55- git push --set-upstream origin :alibot-cleanup-${{ github.event.pull_request_target .number }} -f || true
55+ git push --set-upstream origin :alibot-cleanup-${{ github.event.pull_request .number }} -f || true
5656 echo ::set-output name=clean::true
5757 else
5858 echo "clang-format failed."
@@ -64,17 +64,17 @@ jobs:
6464 git show | cat
6565 echo ${{ secrets.ALIBUILD_GITHUB_TOKEN }} | wc
6666 echo $ALIBUILD_GITHUB_TOKEN | wc
67- git push --set-upstream https://alibuild:$ALIBUILD_GITHUB_TOKEN@github.com/alibuild/AliceO2.git HEAD:refs/heads/alibot-cleanup-${{ github.event.pull_request_target .number }} -f
67+ git push --set-upstream https://alibuild:$ALIBUILD_GITHUB_TOKEN@github.com/alibuild/AliceO2.git HEAD:refs/heads/alibot-cleanup-${{ github.event.pull_request .number }} -f
6868 echo ::set-output name=clean::false
6969 fi
7070
7171 - name : pull-request
7272 uses : alisw/pull-request@master
7373 with :
74- source_branch : ' ${{ github.event.pull_request_target .user.login }}:alibot-cleanup-${{ github.event.pull_request_target .number }}'
75- destination_branch : ' ${{ github.event.pull_request_target .user.login }}:${{ github.event.pull_request_target .head.ref }}'
74+ source_branch : ' ${{ github.event.pull_request .user.login }}:alibot-cleanup-${{ github.event.pull_request .number }}'
75+ destination_branch : ' ${{ github.event.pull_request .user.login }}:${{ github.event.pull_request .head.ref }}'
7676 github_token : ${{ secrets.GITHUB_TOKEN }}
77- pr_title : " Please consider the following formatting changes to #${{ github.event.pull_request_target .number }}"
77+ pr_title : " Please consider the following formatting changes to #${{ github.event.pull_request .number }}"
7878 pr_body : " Please consider the following formatting changes"
7979 continue-on-error : true # We do not create PRs if the branch is not there.
8080
0 commit comments