github-actionsbuilding-github-actions

Create a pull request from a github action without the "Allow GitHub Actions to create and approve pull requests" enabled


I'm wondering if it would be possible to create a pull request without the option enter image description here enabled

it might sound counter-intuitive, but I cannot change that easily (for production repos) and was wondering whether it would be possible to create the PR using my token (saved as a secret), would that require that setting to be enabled as well?


Solution

  • Turns out you can, if you use your own token (from secrets), you absolutely can create a PR without the setting enabled (the action posts a PR on your behalf, not from the github default account)