Skip to content

Commit 04c84c3

Browse files
authored
Merge pull request #6437 from NHSDigital/contributing-branches
Add branching strategy to contributing document
2 parents 64f121a + 6d7de34 commit 04c84c3

1 file changed

Lines changed: 27 additions & 11 deletions

File tree

CONTRIBUTING.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# Contributing
22

3-
## Code reviews
3+
## Branching strategy
44

5-
All pull requests should be reviewed by another developer on the team before
6-
they can be merged in.
5+
We have three named long-lasting branches in the repo:
76

8-
Don't be afraid to use "Request changes" when suggesting changes to a pull
9-
request. This helps to make it easier to filter in lists of pull requests
10-
which are still in need of a review, and the person who raised the pull
11-
request can still dismiss the review if they disagree.
7+
- `release` - This represents the version of the code that is deployed to
8+
production.
9+
- `main` - This represents the version of the code that is either deployed
10+
to production or assured to be deployed to production.
11+
- `next`- This represents the code that is currently in development and not
12+
yet ready to be deployed to production.
1213

13-
## Branch naming
14+
In most cases, new PRs should be raised against the `next` branch, where once
15+
merged, will go out in the next scheduled release. In the case of an emergency
16+
release it can sometimes be necessary to raise a PR against the `main` branch,
17+
where the `next` branch is then rebased against `main` once merged in.
18+
19+
### Naming
1420

1521
We use simple descriptive names for branches such as `add-patient-model`.
1622
To tie commits to Jira tickets etc. we use Git trailers in the comment, e.g.
@@ -19,8 +25,18 @@ To tie commits to Jira tickets etc. we use Git trailers in the comment, e.g.
1925
Jira-Issue: MAV-1234
2026
```
2127

28+
## Code reviews
29+
30+
All pull requests should be reviewed by another developer on the team before
31+
they can be merged in.
32+
33+
Don't be afraid to use "Request changes" when suggesting changes to a pull
34+
request. This helps to make it easier to filter in lists of pull requests
35+
which are still in need of a review, and the person who raised the pull
36+
request can still dismiss the review if they disagree.
37+
2238
## Merging
2339

24-
We use a simple merge rather than a squash merge. Consider doing an interactive
25-
rebase first, to squash any trivial commits that don't add any value to change
26-
history by themselves.
40+
We use a simple merge rather than a squash merge. Consider doing an
41+
interactive rebase first, to squash any trivial commits that don't add any
42+
value to change history by themselves.

0 commit comments

Comments
 (0)