Skip to main content

Create a Github Repository

Any developer added to hmcts org is able to create a new Github repo.

  1. Naming convention for repository is {product}-{component}. For product-level (shared) infrastructure, the name should be {product}-shared-infrastructure. More info
  2. 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.
  3. Repository should be public. Gov UK guidance
  4. 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.

  5. 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

  6. 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 and Require 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.
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.