Skip to main content

GitHub Repository Standards in the Ministry of Justice

The Ministry of Justice uses GitHub repository standards to ensure high-quality code, improve maintainability, and enhance security. These standards promote best practices across all projects, ensuring consistency and improving the efficiency of our development processes.

Our GitHub repository standards have specific criteria that a repository must meet to be considered compliant. Here’s a brief explanation of what the standards are:

  1. Administrators require review: Setting enabled so that repository Admins can’t bypass branch protection rules. This prevents direct pushes to the main branch, helping to maintain the integrity of our codebase.

  2. Default branch main: The default branch should be named ‘main’. This naming convention is a recent standard in the industry that we follow for consistency across projects.

  3. Default branch protection: The main branch should have branch protection rules enabled. This prevents direct pushes to the main branch, helping to maintain the integrity of our codebase.

  4. Repository description: The repository should have a description. This helps provide quick context about the purpose and function of the repository.

  5. Repository license: The repository should include a license file. This provides essential legal information about how others can use, copy, or distribute the project.

  6. Approval reviews required: Pull requests should require at least one approving review before they can be merged into the main branch. This ensures that at least two sets of eyes have reviewed every change.

  7. Issues section enabled: The repository should have the issues section enabled. This allows for better tracking and resolution of bugs, feature requests, and other tasks.

We maintain a reports-dashboard to identify commonalities and trends across the organisation and identify improvement areas. The Operations Engineering team uses this information to guide and support teams and projects and ensure that our GitHub repositories remain accessible, safe, and easy to contribute to.

To read more about why we have these standards, please see our technical standards documentation.

How to apply the standards

We have tried to make these standards easy to apply. Most of these standards are either applied by making changes to repository setting or adding a file to the repository.

How to check if your repository is compliant

You can check if your repository is compliant by using the Operations Engineering reports dashboard.

How to show your repository is compliant

You can add a badge to your repository by following the instructions outlined here

This page was last reviewed on 20 November 2024. It needs to be reviewed again on 20 May 2025 by the page owner #operations-engineering-alerts .
This page was set to be reviewed before 20 May 2025 by the page owner #operations-engineering-alerts. This might mean the content is out of date.