how can I change the display name for the GitHub Actions bot on a commit?
Currently I am using this workflow git parameters:
- name: Configure Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "GitHub Actions [Bot]"
- name: Commit files
run: |
git add ${{github.workspace}}/lib/bin/*
git diff-index --quiet HEAD || git commit --author="GitHub Actions [Bot] <github-actions[bot]@users.noreply.github.com>" -m "Commited compiled binaries"
The result looks something like this:
github-actions[bot] Commited compiled binaries
But I want a result like this, like I specified in the config...:
GitHub Actions [Bot] Commited compiled binaries
Is this even possible to change the display name?
Yes, it is possible, and technically you're doing it right¹,
but github-actions[bot]@users.noreply.github.com
is a known email to Github,
and therefore the email-to-user translation on Microsoft Github is in effect and the username / avatar is used.
Instead, use a different email address and you can choose the name to display and as long as the email is unknown to Microsoft Github, that name will be used and the avatar is blanked.
The git history itself is not affected by this, it is only the display of the commits on github.com
via HTTP in the hypertext interface.
¹ right (tm) -- only the --author
option for git-commit(1)
looked superfluous to me