GitHub Repository Rules Now Generally Available
Thursday, 27 July 2023

GitHub has announced that its Repository Rules feature is now generally available. Repository Rules can be used to define protections for branches and tags in repositories.  GitHub Enterprise Cloud customers can enforce them across the entire organization.

The Repository Rules feature extends the existing support for protected branches.

githubdeklogo

Repository rules let you set targets to protect multiple branch patterns using a single ruleset. A ruleset is a collection of rules that are enforced together. You can control things like who can push commits to a certain branch, or who can delete or rename a tag. GitHub's example is that you could require that all commits to a branch are signed and that those commits have two reviewers. Rulesets can also be applied to tags, allowing you to enforce rules on releases.

When rules are in place for a repository, everyone collaborating can see the rules that exist via an overview page that provides visibility on the rules applicable to a branch.

Rule layering takes care of having multiple rulesets targeting the same branch or tag. A ruleset does not have a priority. Instead, if multiple rulesets target the same branch or tag in a repository, the rules in each of these rulesets are aggregated. If the same rule is defined in different ways across the aggregated rulesets, the most restrictive version of the rule applies. As well as layering with each other, rulesets also layer with protection rules targeting the same branch or tag.

You can also set up bypass options that grant bypass permissions for the ruleset. The bypass can be set at the role, team, or app level. For example, you could set bypass options so a GitHub App can skip status checks with no additional permissions, or administrators can bypass pull requests while still requiring the important CodeQL checks to run.

GitHub Repository Rules are available now.

githubdeklogo

 

More Information

Repository Rulesets Documentation

Related Articles

GitHub Code Scanning Now Uses Machine Learning

GitHub Strengthens Team Working

New From GitHub Universe

GitHub Launches Actions

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Java Version 22 Released
04/04/2024

JDK 22 is not a Long Term Support release, but is one of the regular releases that are scheduled to arrive every six months. Still, it has got a lot to show for itself.



Visual Studio 17.9 Now Generally Available
18/03/2024

Visual Studio 17.9 is now fully available with AI assistance and better extensibility. The first preview of 17.10 has also been made available in preview.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info