This content originally appeared on DEV Community and was authored by Atsushi Suzuki
When trying to create a pull request (PR) from a GitHub Actions workflow, you may need to enable the Allow GitHub Actions to create and approve pull requests
option in the repository settings. However, you might encounter the issue where this option is grayed out and cannot be enabled. In this article, I'll share the solution that worked for me.
Solution
The location of the setting varies depending on whether you are using GitHub Enterprise, a GitHub Organization, or neither. Below are the appropriate links to access the settings based on your specific scenario. Replace YOUR_ORG
with your organization's name and YOUR_REPO
with the repository name where your workflow is running.
If you are using GitHub Enterprise
Go to the following link:
https://github.com/enterprises/YOUR_ORG/settings/actionsIf you are using a GitHub Organization
Use this link:
https://github.com/organizations/YOUR_ORG/settings/actionsIf you are not using GitHub Enterprise or an Organization
Go to the repository's settings directly:
https://github.com/YOUR_ORG/YOUR_REPO/settings/actions
In my case, since I was using GitHub Enterprise, I accessed the following link to enable the option:
https://github.com/YOUR_ORG/YOUR_REPO/settings/actions
.
Here’s the updated settings screen:
This content originally appeared on DEV Community and was authored by Atsushi Suzuki
Atsushi Suzuki | Sciencx (2024-09-12T04:51:28+00:00) How to Enable the `Allow GitHub Actions to create and approve pull requests` Option When It’s Grayed Out. Retrieved from https://www.scien.cx/2024/09/12/how-to-enable-the-allow-github-actions-to-create-and-approve-pull-requests-option-when-its-grayed-out/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.