GitHub simplifies workflow with new Repository rule sets

Priya Walia

GitHub

GitHub has introduced a new feature that simplifies the process of centrally managing workflows for its enterprise cloud customers.

“GitHub has simplified the process of centrally managing workflows. Available today, GitHub Enterprise Cloud customers can require that certain workflows need to run successfully before code can be merged into an organization’s repositories,” the company said in a blog post.

For those unaware, Repository rulesets are a valuable tool for improving the setup and management of workflows, offering benefits such as branch targeting, bypass rules, and the ability to evaluate rules before running them.

What’s New?

GitHub has introduced a new feature that allows users to enforce required workflow runs for added code in their repositories. This provides a higher level of control and ensures that specified workflows run successfully before pull requests can be accepted. The feature can be applied to selected repositories or all repositories within an organization, making it scalable regardless of the number of contributors.

Users can also customize the specificity of the workflow by branch, tag, current commit, or specific SHA to ensure the required version is used. These controls aim to save engineering time and effort by enforcing workflow runs before code is merged and deployed.

Another advantage is the ease of use provided by repository rulesets. Requiring workflows through repository rulesets centralizes the setup and maintenance of rules in a user-friendly UI. This allows all additional tools provided by rulesets, such as creating a bypass list, to be applied to workflow rules. With this feature, specific users can be granted the ability to “break the glass” and merge code even if the workflow doesn’t succeed.

GitHub also enables users to set up and evaluate the potential impact of required workflow policies without disrupting the flow of contributors. This ensures fine-tuning and testing of settings before enforcing them on repositories.

To aid auditing, GitHub provides Repository Rule Insights, a powerful tool to evaluate required workflows. When introducing a workflow rule, users can place it into “Evaluate” mode. This mode reports the results of the rule without blocking downstream repository contributions. It allows the necessary time to evaluate the results before enforcing the rule.

Once the rule is working as intended, switching from “Evaluate” to “Activate” enforces the rule and prevents any code associated with the workflow from being merged into the repository.

So that was it. Let us know your thoughts about the announcement in the comment section below.