建立拉取请求合并条件
您可以要求拉取请求在可以合并之前先通过一组检查。 例如,您可以阻止未通过状态检查的拉取请求。
关于受保护分支和必需状态检查
受保护分支确保仓库的协作者无法对分支进行不可撤销的更改。 必需状态检查确保在协作者可以对受保护分支进行更改前,所有必需的 CI 测试都已通过。 Branches within repositories that belong to organizations can be configured so that only certain users or teams can push to the branch.
配置受保护分支和必需状态检查
You can enable protected branches for limiting branch manipulation, as well as enforce required status checks before a branch is merged in a pull request or before commits on a local branch can be pushed to the protected remote branch.