-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Want to automate creation of a PR on behalf of a user #1971
Comments
You can change the Additionally, if you want the PR to be created by a specific user then the PAT must be created on that user and passed to the Let me know if you need further help. |
Judging by cli/cli#6575, the automatic GITHUB_TOKEN generated by GitHub can be used to create pull requests. This means it will likely create a PR "authored by GitHub Actions", which is what I'd like to see for such automated PRs. This is what I'd need this action to accept:
|
Hi @fregante I've made your suggestion possible in the next major version of the action. You can test it like this: - uses: peter-evans/create-pull-request@v6-rc
with:
git-token: ${{ secrets.PAT }} Just leave the I'll be releasing |
That's fantastic! But are you sure it can actually take the token automatically? Sounds unsafe, I think only action/checkout can do that |
Perhaps you're referring to how the the token is stored for use with git. It uses the git The action has been working this way for a long time. The |
sorry to dig up a closed issue, but do I understand correctly that it's not possible to set a custom PR author if using an app token? We aren't able to use PATs at this time. |
@kubukoz There's no such thing as a custom PR author. The author of the PR is always the user account associated with the token. There is no way to change that as far as I know. I'm not very familiar with GitHub apps, but my guess is that the tokens generated by apps are associated with the owner of the app. If you want the PR author to be a different user, then you would probably need that user to be the app owner. |
@kubukoz I ended up creating a custom workflow. Hope this helps you solve your issue but it does use PATs.
|
Just for your information. This is advanced notice that the |
This is more of a request on using the API after struggling for several hours.
Is it possible to have someone push to a branch and then open a PR on behalf of that user?
Here is what I have so far and it doesn't reflect the changes on the original commit. Any guidance would be very appreciated, thank you!
The text was updated successfully, but these errors were encountered: