Create a GitHub Repository
Any developer added to the HMCTS GitHub organisation can create a new GitHub repository.
If you do not have access, follow GitHub onboarding.
- 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 the boilerplate code needed for a new app.
- spring-boot-template
- expressjs-template
- If you are creating a Python component, see Python services for the FastAPI templates.
- Alternatively you can simply create a blank directory. If so, we recommend you draw inspiration from an existing working repository.
- Repositories should be public. See GOV.UK guidance.
Do not add collaborators from outside the organisation. Access must be managed with GitHub teams, not individual users.
Note: Remove the user-level admin access you received when creating the repository after you have added your team admins with the admin role.
Find or create your GitHub team in Github. Give your team members the following access to the repository.
GitHub team Role <team-name>write <team-name>-adminsadmin Add a branch protection rule for the
masterbranch with the recommended settings below. This is inhttps://github.com/[REPO]/settings/branches, then clicking “Add rule” beside Branch protection rules.- Enable
Require a pull request before mergingandRequire approvals(minimum 1) - Choose which status checks need to be mandatory for merging PRs. The standard Jenkins check is
continuous-integration/jenkins/pr-merge(this can be done only after Jenkins checks have run once) - We recommend enabling
Do not allow bypassing the above settings.
- Enable
Next step in Creating a New Component: Jenkins setup