Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Branch protection settings #894

@RalfJung

Description

@RalfJung

After a lot of searching I found the recommended branch protection settings for bors, somewhat hidden in a section titled "If it doesn’t work":

You can check this on GitHub in your repository’s Settings tab, in the Branches section. The “master” branch can be protected, and since bors will usually be the only thing that commits directly to master, you can set it to require the “bors” Commit Status to push to master. Do not set the staging/trying branches to protected.

However, this "require commit status" has a very annoying side-effect: when opening a PR, even after local CI in that branch passes, GitHub considers the branch as "waiting for CI" and will not show a green checkmark. So, I think setting that option is not good advice.

Further down in that section, after some unrelated answers, it also says

Also, make sure bors is included in the list allowed to push to the protected branch.

I assume that refers to "Restrict who can push to matching branches"? Having an explicit statement in a single place, maybe even a screenshot, of what the recommended branch protection settings are would be really helpful. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions