Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the bot creates a pull request, it'll be listed as author on the commit. Can that change? #360

Open
nhoening opened this issue Mar 23, 2021 · 5 comments
Labels
Waiting for GitHub Waiting for a feature in the GitHub API to resolve this issue

Comments

@nhoening
Copy link

I love the openDraftPR feature ― thanks :)

However, I would prefer that the Github user who is assigned to the ticket (which originally led to the new branch and PR) would be the one listed as the author of the merge commit, and not create-issue-branch [bot].

@robvanderleek
Copy link
Owner

robvanderleek commented Mar 24, 2021

Hi @nhoening 😄

The behaviour you describe has been mentioned by others (for example see this discussion) but unfortunately I haven't found a solution.

Just for my understanding: are you using the CIB App or GitHub Action?
For both options I don't think it's possible to let the App/Action "impersonate" the user that activated it.

If you know of a way to do this (or know of any Apps/Actions that do this correctly) let me know!

@nhoening
Copy link
Author

Thanks for replying. I'm using the app I believe.

@robvanderleek robvanderleek added the Waiting for GitHub Waiting for a feature in the GitHub API to resolve this issue label Apr 7, 2021
@stale stale bot added the wontfix This will not be worked on label May 8, 2021
Repository owner deleted a comment from stale bot May 9, 2021
@stale stale bot removed the wontfix This will not be worked on label May 9, 2021
@stale stale bot added the wontfix This will not be worked on label Jun 8, 2021
Repository owner deleted a comment from stale bot Jun 8, 2021
@stale stale bot removed the wontfix This will not be worked on label Jun 8, 2021
@robvanderleek robvanderleek added the pinned Issue does become stale label Jun 8, 2021
@erlete
Copy link

erlete commented Nov 10, 2022

Hey there, sorry for being so late. Hope this is helpful anyway.

I've found out that by using your PAT (Personal Access Token) instead of the GITHUB_TOKEN, you can perform workflow operations assigned to your user. If you are working with a team, you could always set up multiple secrets with PATs for each team member, labeled, of course and then use conditional statements depending on the issue assignee to use the correct token for workflow operations.

This is a questionable procedure, given that every user would have to provide with a PAT (which some users might not like to do) and since GitHub disencourages this procedure for potential security risks. However, with brand-new fine-grained tokens this should not pose a big risk.

@robvanderleek
Copy link
Owner

Hi @erlete 👋

The issue is still open so never too late for a proposed solution 😉

Fine-grained access tokens would indeed be a way for the GH Action to impersonate users.
I'm not sure if Create Issue Branch is the right place to implement this functionality. Perhaps it's possible to create a separate GH Action for this? Such an action would output a token for the current user that downstream actions (such as Create Issue Branch) can consume.
I haven't searched if such an action already exists but I guess other GH actions run into the same problem and would also benefit from it.

@Jimimaku
Copy link

Jimimaku commented Nov 21, 2022

Ich liebe das Feature ― danke :)openDraftPR

Ich würde es jedoch vorziehen, dass der Github-Benutzer, der dem Ticket zugewiesen ist (was ursprünglich zum neuen Zweig und PR führte), derjenige ist, der als Autor des Merge-Commits aufgeführt ist und nicht.create-issue-branch [bot]

@robvanderleek robvanderleek removed the pinned Issue does become stale label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for GitHub Waiting for a feature in the GitHub API to resolve this issue
Projects
None yet
Development

No branches or pull requests

4 participants