Create a Github Repository
Any developer added to hmcts org is able to create a new Github repo.
- Naming convention for repository is
{product}-{component}
. For product-level (shared) infrastructure, the name should be{product}-shared-infrastructure
. More info - If you are creating a NodeJS front end or Java backend component, you may want to use a template. These templates provide all the boiler plate code needed for a new app.
- spring-boot-template
- expressjs-template
- Alternatively you can simply create a blank directory. If so, we recommend you draw inspiration from an existing working repository.
- Repository should be public. Gov UK guidance
Do not add any collaborators outside organization. All access needs to be managed with GitHub teams and not users.
Note: You need to remove the user level admin access you got while creating the repository after you have added your team admins with the admin role.
Find or create your Github Team in Team Onboarding. Give your team members the following access to the Repo.
Github team Role <team-name>
write <team-name>-admins
admin Add a branch protection rule for
master
branch with the recommended settings below. This is in https://github.com/[REPO]/settings/branches, then clicking “Add rule” beside Branch protection rules.- Enable
Require a pull request before merging
andRequire approvals
(minimum 1) - Choose which status checks needs to be mandatory for merging PRs. The standard Jenkins check is
continuous-integration/jenkins/pr-merge
(this can be done only after checks like Jenkins have been run once) - We recommend enabling
Do not allow bypassing the above settings
.
- Enable
This page was last reviewed on 16 May 2024.
It needs to be reviewed again on 16 November 2024
by the page owner platops-build-notices
.
This page was set to be reviewed before 16 November 2024
by the page owner platops-build-notices.
This might mean the content is out of date.