Introducing a new repository will increase the amount of maintenance for the dev team. Make sure the team has discussed and agreed whether a new repo is really necessary before following the steps below.
We publish code in the open, following the GDS Way guidance. Where this document is unclear, refer to GDS Way guidance. Where this document conflicts with GDS Way guidance, consult with team members.
We manage all code (and some other resources) using Git repositories on GitHub. Any new repository (repo) needs to have a couple of things included before it can be added to GitHub:
LICENCEfile containing the MIT licence
READMEfile using GitHub-flavoured Markdown syntax titled with the name of the repo and containing a description of what is in the repo.
You should also consider adding a
.gitignore file that prevents build
artifacts or temporary files from being committed accidentally; see the GitHub
article on Ignoring files for guidance on how to do this.
Any new repos should be created in the GDS GitHub org. Digital Marketplace GitHub teams should have
access to the new repo (“Admin” permissions for
If you want to initially experiment locally before deciding whether to create a new repo you can create a repo under your own user but transfer ownership later (note that is different from forking).
The repo name should have the
digitalmarketplace- prefix. Words in the name
should be in all lower case letters, seperated by hyphens (
Consult with the team before naming; naming is hard!
Make sure to add a description for the repo, something short that describes what the repo is for.
Once the repo is set up you should enable branch protection for the
- Require 1 pull request review before merging
- Require status checks to pass before merging
- Require branches to be up to date before merging
- Include administrators
You should also set the merge button options to automatically delete head branches to keep the number of branches in the repo managable over time.
Once your repo is on GitHub, you need to make other services we use aware of its existence.
You should add the repo to the list of Digital Marketplace repos in
alphagov/seal, so that notifications about open PRs get sent to the
#dm-review Slack channel.
You should add the GitHub Trello Poster to the repos webhooks so that devs can attach a link to a Trello ticket in a PR and have the Trello ticket automatically updated with a link to the PR.
If the repo contains code you should add it to Snyk to have it regularly checked for security vulnerabilities.
If the repo has Python code you should add it to PyUp and create a .pyup.yml file so that automatic PRs will be generated weekly to update requirements.
It your repo has tests (it should!) you should add the repo to Travis and create a Travisfile.
Finally, you should consider throwing a birthday party 🎉.