DEV Community

Atsushi Suzuki
Atsushi Suzuki

Posted on

How to Enable the `Allow GitHub Actions to create and approve pull requests` Option When It's Grayed Out

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.

Screenshot 2024-09-12 13.36.34.png

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.

  1. If you are using GitHub Enterprise

    Go to the following link:

    https://github.com/enterprises/YOUR_ORG/settings/actions

  2. If you are using a GitHub Organization

    Use this link:

    https://github.com/organizations/YOUR_ORG/settings/actions

  3. If 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:

Screenshot 2024-09-12 13.37.08.png

Top comments (0)