Green Build Ratio
Ensuring the quality and stability of your software product is a top priority in software development. One way to help achieve this is by controlling the build status of merged pull requests (PRs). Merging PRs only when the build is green, i.e., all tests have passed, is a common best practice. It helps maintain the health of the main codebase and reduces the risk of introducing bugs or other issues.
Control the Build Status of Merged Pull Requests (PRs)
with the
Green Build Ratio
Ensuring the quality and stability of your software product is a top priority in software development. One way to help achieve this is by controlling the build status of merged pull requests (PRs). Merging PRs only when the build is green, i.e., all tests have passed, is a common best practice. It helps maintain the health of the main codebase and reduces the risk of introducing bugs or other issues.
From startups to large enterprises, Keypup serves all the unique complexities related to project size, structure and teams, including:
Green Build Ratio
The Green Build Ratio is a metric that helps you automatically track the ratio of green build status of all merged pull requests directly from your Git repositories. By keeping an eye on this ratio, you can ensure that your team is adhering to best practices and maintaining the quality of your codebase.
Understanding the Green Build Ratio
Keypup calculates the Green Build Ratio based on the total number of green builds among all merged PRs in the past 12 months. This ratio is particularly useful during audit and compliance procedures, such as SOC 2, as it provides a clear, quantifiable measure of your team's adherence to code quality standards.
Accelerate Software Audits with the Green Build Ratio Template
The Green Build Ratio template is based on Git repositories and can calculate the ratio dynamically. This enables you to adhere to strict build policies such as:
- Ensuring that engineers do not merge pull requests with a red build: One of the main uses of the Green Build Ratio is to ensure that only PRs with a green build are merged. This helps maintain the quality and stability of your codebase by ensuring that every change passes all the necessary tests before being merged.
- Handling exceptions appropriately: There may be exceptions when a PR is merged even though the build is not green. In such cases, it's important to have a record of why the exception was made. The Green Build Ratio template helps enforce this by asking GitHub, GitLab, or Bitbucket administrators to leave a detailed comment explaining why they are merging without a green build.
By keeping track of the Green Build Ratio, you can ensure that your team is maintaining a high standard of code quality, and make the audit and compliance process smoother and more efficient.
The Green Build Ratio is an invaluable tool for any software development team looking to maintain high-quality code and efficient processes. By providing a clear, quantifiable measure of your team's adherence to best practices, it allows you to make informed decisions and keep your software development project on track.