How to store source code
At MHCLG, we follow the principles set out in the Service Manual for managing the code we write by:
Publish open source code
Wherever possible, we make our source code open and reusable. This means other government departments and people in outside organisations can benefit from our work.
It’s not always appropriate to open code. There are sometimes grounds for keeping some data and code closed, for example:
- keys and credentials
- algorithms used to detect fraud
- code or data that makes clear details of unannounced policy
The Service Manual explains how to open previously closed code and your responsibilities for maintaining open code.
When you publish open source code, your project must:
- include a
README
, using guidance for writing a README - include a
SECURITY.md
file detailing how to submit security related bug reports - have useful and informative commit messages about why a change was made
- include an MIT and/or OGL licence file
For projects intended for use by other people, your project should also:
- provide a changelog, for example the specification for CPAN Changes files
- list a version number compatible with Semantic Versioning
- link to a public list of known issues and bugs, for example GOV.UK Frontend issues
- publish packages to relevant language specific repositories such as PyPI - the Python Package Index or RubyGems
If your project accepts contributions from the public, your project should also:
- post contributors’ guidelines in a contributing file
- set up any tests to run in a public continuous integration environment using tools such as Github Actions
See also
This page was last reviewed on 4 March 2025.
It needs to be reviewed again on 4 March 2026
by the page owner #mhclg-way
.
This page was set to be reviewed before 4 March 2026
by the page owner #mhclg-way.
This might mean the content is out of date.