Skip to main content

Managing auto-merge for pull requests in your repository

You can allow or disallow auto-merge for pull requests in your repository.

Who can use this feature

People with maintainer permissions can manage auto-merge for pull requests in a repository.

拉取请求自动合并适用于 组织的具有 GitHub Free 和 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。

About auto-merge

If you allow auto-merge for pull requests in your repository, people with write permissions can configure individual pull requests in the repository to merge automatically when all merge requirements are met. If someone who does not have write permissions pushes changes to a pull request that has auto-merge enabled, auto-merge will be disabled for that pull request. For more information, see "Automatically merging a pull request."

Managing auto-merge

注意:启用自动合并的选项仅在无法立即合并的拉取请求中显示。 例如, 当分支保护规则执行“合并前需要拉取请求审查”或“需要通过状态检查才能合并”并且这些条件尚未满足。 有关详细信息,请参阅“管理分支保护规则”。

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.
  2. 在存储库名称下,单击 “设置”。 “存储库设置”按钮
  3. Under "Pull Requests", select or deselect Allow auto-merge. Checkbox to allow or disallow auto-merge