action-commit-push icon indicating copy to clipboard operation
action-commit-push copied to clipboard

Possible mismatch authorship of the commit

Open damianooldoni opened this issue 3 years ago • 1 comments

:memo: Brief description

I am using this action in combination with your other action, action-pull-request, in a workflow called fetch-data,

The changes are committed to the new branch and a PR is created and labelled, that's fine. I would like to perform both steps using a PAT (personal access token) created within my machine account and saved as a repo secret called WORKFLOWS. The PR step is performed by the machine account as expected, see for example PR #48. However you can see in the same PR that the commit 8614e69 created by the commit-push step is still performed under my name, @damianooldoni, not the machine account even if I use, as for the PR step, github_token: ${{ secrets.WORKFLOWS }} in the with section, see #L62.

Am I doing something wrong? Thanks for any help.

damianooldoni avatar Jun 27 '22 10:06 damianooldoni

Hi. GitHub PAT doesn't have user information stored with it. It still uses current git user. In case of this action it's being set here https://github.com/devops-infra/action-commit-push/blob/master/entrypoint.sh#L29 I may try to add an additional input variable to set a different username, then it should work.

ChristophShyper avatar Jun 28 '22 12:06 ChristophShyper