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


Amazon Adds AWS Lambda Code Editing Tool
04/11/2024

Amazon has added a new code editing option for AWS Lambda in the AWS console based on the Code-OSS, Visual Studio Code Open Source code editor.



Visual Studio 17.12 Released Along With Aspire
25/11/2024

Visual Studio 2022 v17.12 is now available. The release can be used for .NET 9 projects and has a range of other improvements.


More News

espbook

 

Comments




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