Closed adamlui closed 1 year ago
Hm, this should definitely work. We have unit tests that cover this feature: https://github.com/stefanzweifel/git-auto-commit-action/blob/master/tests/git-auto-commit.bats#L261-L289
Can you provide a link to a workflow run, where the action used the wrong commit user name?
Sure hang on let me run one
https://github.com/adamlui/userscripts/actions/runs/4543504484/jobs/8008272540 w/ commit_user_name: auto-sync[bot]
resulted in https://github.com/kudoai/bravegpt/commit/67ae75faa94073cfe6c39089a268d49d9f4c61e4 w/ commit user name github-actions[bot]
instead
btw I really love your script and would be extremely happy just syncing w/ the wrong name, but if I could get the custom username to work it would rock my world
I'd assume that you also need to set the commit_user_email
.
@lars-reimann do you use single, double or no quotes for the value?
It shouldn't matter in this case, test@example.org
, 'test@example.org'
and "test@example.org"
are all the same YAML string. But the rules for strings are rather complicated, so use quotes if you wanna be on the safe side.
@lars-reimann it worked!!
Do you know how I can assign it an icon so visually it looks even more like 2 entities were involved in the commit?
@adamlui The icon is the avatar of the GitHub user associated with the commit_user_email
. So if you want to see a different icon, you would need to create a new GitHub account for the email.
Maybe you could also register the email at https://en.gravatar.com and set the profile picture there. Maybe GitHub will pick that up. 🤔
That's also why the commit_user_email
-value defaults to the email of the "Actions" GitHub account. To showcase that the commit has been made by 2 entities.
And thanks @lars-reimann for the help here. I didn't make the connection that commit_user_email
also has to be updated.
@lars-reimann @stefanzweifel creating a GitHub acct works beautifully! (the potential en.gravatar.com method awkwardly requires creating a WordPress acct)
git-auto-commit Version
v4
Machine Type
Ubuntu (eg. ubuntu-latest)
Bug description
Specifying a custom username in
commit_user_name
has no effect, insteadgithub-actions[bot]
is always the committerSteps to reproduce
In workflow, set
commit_user_name
to a value that is notgithub-actions[bot]
Tried solutions
auto-sync[bot]
ascommit_user_name
value'auto-sync[bot]'
ascommit_user_name
valueExample Workflow
Relevant log output
Activity log shows
github-actions[bot]
as the constant committer despite above YML