Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-09-25. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Allowing changes to a pull request branch created from a fork

For greater collaboration, you can allow commits on branches you've created from forks in your personal account.

Who can use this feature?

People with push access to the upstream repository of a fork in a personal account can commit to the forked branches.

When a user creates a pull request from their fork, the user generally has the authority to decide if other users can commit to the pull request's compare branch. If the pull request author wants greater collaboration, they can grant maintainers of the upstream repository (that is, anyone with push access to the upstream repository) permission to commit to the pull request's compare branch. To learn more about upstream repositories, see "About forks."

Pull request authors can give these permissions when they initially create a pull request from a fork in a personal account or after they create the pull request. For more information, see "Creating a pull request from a fork."

You can set commit permissions when you first create a pull request from a fork. For more information, see "Creating a pull request from a fork." Additionally, you can modify an existing pull request to let repository maintainers make commits to your branch.

Enabling repository maintainer permissions on existing pull requests

  1. On GitHub Enterprise Server, navigate to the main page of the upstream repository of your pull request.

  2. Under the upstream repository name, click Pull requests.

    Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Pull requests," is outlined in dark orange.

  3. In the list of pull requests, navigate to the pull request that you'd like to allow commits on.

  4. On user-owned forks, if you want to allow anyone with push access to the upstream repository to make changes to your pull request, select Allow edits from maintainers.

    Warning

    If your fork contains GitHub Actions workflows, the option is Allow edits and access to secrets by maintainers. Allowing edits on a fork's branch that contains GitHub Actions workflows also allows a maintainer to edit the forked repository's workflows, which can potentially reveal values of secrets and grant access to other branches.

    Screenshot of a pull request. On the right bottom side, a blue, enabled checkbox, labeled "Allow edits and access to secrets by maintainers", is highlighted with an orange outline.

Further reading