File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1616 - name : Compute changes
1717 id : changes
1818 run : |
19- changes=$(git diff --stat HEAD~1 HEAD)
19+ if git rev-parse --verify HEAD~1 >/dev/null 2>&1;
20+ then
21+ changes=$(git diff --stat HEAD~1 HEAD)
22+ else
23+ changes=$(git show --stat HEAD)
24+ fi
2025 echo "changes<<EOF" >> $GITHUB_OUTPUT
2126 echo "$changes" >> $GITHUB_OUTPUT
2227 echo "EOF" >> $GITHUB_OUTPUT
3035 message : |
3136 New Push to GitHub!
3237
33- - Repository: ${{ github.repository }}
34- - Branch: ${{ github.ref_name }}
38+ - Repository: [ ${{ github.repository }}](${{ github.server_url }}/${{ github.repository }})
39+ - Branch: [ ${{ github.ref_name }}](${{ github.server_url }}/${{ github.repository }}/tree/${{ github.ref_name }})
3540 - Commit: [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
3641
3742 Changes:
You can’t perform that action at this time.
0 commit comments