How to assume user that started action?

Hi all :wave:

I’m maintaining an action that creates branches from issues.
A common usage pattern is that multiple developers in a single repository interact with this action (for example giving it ChatOps commands in issue comments).
However, all activities from the action are done under the github-actions [bot] account.
I’m aware of the option to inject a Personal Access Token (PAT) into the action but this would make all the activities originate from the account that belongs to the PAT.

Any other options that I missed? If not, would it be a viable roadmap issue to have actions assume the user account that interacts with it?

See this and this issue for the type of problems users of my action currently run into.

Kind regards,
Rob van der Leek

Well, you could ask for a PAT from all the users that you want to impersonate. I think the problem is self-evident: people don’t want you to be able to arbitrary impersonate them. Creating issues or commenting on them on behalf of another user without their consent is likely something that will never be allowed by GitHub - even though it would be useful to some extent under certain circumstances, such as splitting user-reported issues or migrating issues from one repo to another (when the transfer issue feature isn’t available, which is often the case I must say).

1 Like

Thanks for your reply @Simran-B
As I’m extending the functionality of the GitHub platform with an App/Action I’d say it does make sense to be able to arbitrary impersonate the user that activated it. GitHub could provide a consent mechanism for that.
Perhaps anyone from the GitHub App/Actions team here who would like to comment on this?