Skip to content

Suggestion: Change Branch-Protection check to consider rule of "change only through PRs" #2727

@diogoteles08

Description

@diogoteles08

Is your feature request related to a problem? Please describe.

The current Branch Protection check does not consider the rule named Require a pull request before merging (you can check it on the GitHub page). This rule is actually very important because it forces any change on the branch to be made through PRs, and would therefore prevent malicious pushes -- that could even be made through actions with write permissions.

The closest to this we currently have is the requirement of Reviewers >= 1 to get a 6/10 score. But this might be specially difficult to solo-devs, while the Require a pull request before merging is possible even for a single maintainer.

Describe the solution you'd like

The purpose is to make this rule enhance the Branch-Protection rule somehow. My suggestion would be to add this rule as a new tier with a 5/10 punctuation. This would give a score higher than the 3/10, which basically requires prevention of force pushes and branch deletion, and slightly lower than 6/10, which requires a reviewer other than the commiter.

Describe alternatives you've considered

  • The rule could be added as a new requirement to get a 3/10 grade. But this might be frustrating to the projects that already had the effort to get this grade, as they could be led to 0/10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions