File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 7676 git config --global user.name "github-actions[bot]"
7777 git config --global user.email "github-actions[bot]@users.noreply.github.com"
7878
79+ - name : Remember author and email of last commit
80+ run : |
81+ LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")
82+ LAST_COMMIT_EMAIL=$(git log -1 --pretty=format:"%ae")
83+ echo "LAST_COMMIT_AUTHOR=$LAST_COMMIT_AUTHOR" >> $GITHUB_ENV
84+ echo "LAST_COMMIT_EMAIL=$LAST_COMMIT_EMAIL" >> $GITHUB_ENV
85+
7986 - name : Perform interactive rebase with autosquash
8087 env :
8188 EDITOR : ' true' # to automatically complete the interactive rebase
8491 git fetch origin
8592 git rebase -i --autosquash origin/$BASE_REF
8693
94+ - name : Replace renovate author to prevent renovate overriding changes
95+ env :
96+ EDITOR : ' true' # to automatically complete the amend
97+ run : |
98+ COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")
99+ if [ "$COMMIT_AUTHOR" = "renovate[bot]" ] || [ "$COMMIT_AUTHOR" = "we-renovate[bot]" ]; then
100+ git commit --amend --author="$LAST_COMMIT_AUTHOR <$LAST_COMMIT_EMAIL>"
101+ fi
102+
87103 - name : Push changes
88104 run : |
89105 git push --force-with-lease
You can’t perform that action at this time.
0 commit comments