Skip to content

Commit fc6c436

Browse files
authored
Docs: [AEA-0000] - improve documentation (#52)
## Summary - Routine Change ### Details - update readme - update pull request template - update contributing - update release
1 parent 2bbfe7c commit fc6c436

File tree

4 files changed

+77
-9
lines changed

4 files changed

+77
-9
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ Tag can be one of:
3333
- `Upgrade` - for a dependency upgrade. (Patch release)
3434
- `Chore` - for refactoring, adding tests, etc. (anything that isn't user-facing). (Patch release)
3535

36+
If the current release is x.y.z then
37+
- a patch release increases z by 1
38+
- a minor release increases y by 1
39+
- a major release increases x by 1
40+
3641
Correct tagging is necessary for our automated versioning and release process ([Release](./RELEASE.md)).
3742

3843
The description of your pull request will be used as the commit message for the merge, and also be included in the changelog. Please ensure that your title is sufficiently descriptive.

CONTRIBUTING.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,68 @@
11
# Contribution Guidelines
22

33
## Raising an Issue
4+
45
If you raise an issue against this repository, please include as much information as possible to reproduce any bugs,
56
or specific locations in the case of content errors.
67

78
## Contributing code
9+
810
To contribute code, please fork the repository and raise a pull request.
911

1012
Ideally pull requests should be fairly granular and aim to solve one problem each. It would also be helpful if they
1113
linked to an issue. If the maintainers cannot understand why a pull request was raised, it will be rejected,
1214
so please explain why the changes need to be made (unless it is self-evident).
1315

1416
### Merge responsibility
15-
* It is the responsibility of the reviewer to merge branches they have approved.
16-
* It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
17-
* It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.
17+
18+
- It is the responsibility of the reviewer to merge branches they have approved.
19+
- It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
20+
- It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.
1821

1922
### Branch naming
23+
2024
Branch names should be of the format:
2125

22-
`apm-nnn-short-issue-description`
26+
`aea-nnn-short-issue-description`
2327

2428
Multiple branches are permitted for the same ticket.
2529

2630
### Commit messages
31+
2732
Commit messages should be formatted as follows:
28-
```
29-
APM-NNN Summary of changes
33+
34+
```text
35+
AEA-NNN Summary of changes
3036
3137
Longer description of changes if explaining rationale is necessary,
3238
limited to 80 columns and spanning as many lines as you need.
3339
```
3440

41+
Commits from a pull request get squashed into a single commit on merge, using the pull request title as the commit message.
42+
Please format your pull request title using tags from [ESLint Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint) as follows:
43+
44+
```text
45+
Tag: [AEA-NNNN] - Short description
46+
```
47+
48+
Tag can be one of:
49+
50+
- `Fix` - for a bug fix. (Patch release)
51+
- `Update` - either for a backwards-compatible enhancement or for a rule change that adds reported problems. (Patch release)
52+
- `New` - implemented a new feature. (Minor release)
53+
- `Breaking` - for a backwards-incompatible enhancement or feature. (Major release)
54+
- `Docs` - changes to documentation only. (Patch release)
55+
- `Build` - changes to build process only. (No release)
56+
- `Upgrade` - for a dependency upgrade. (Patch release)
57+
- `Chore` - for refactoring, adding tests, etc. (anything that isn't user-facing). (Patch release)
58+
59+
If the current release is x.y.z then
60+
- a patch release increases z by 1
61+
- a minor release increases y by 1
62+
- a major release increases x by 1
63+
64+
Correct tagging is necessary for our automated versioning and release process ([Release](./RELEASE.md)).
65+
3566
### Changelog
36-
Every pull request must include a change to the changelog.
3767

38-
Add changes to the top of the current date. If the date is old, the reviewer should update the changelog to be correct before merging.
68+
Release changelogs are generated from the titles of pull requests merged into the `main` branch. Please ensure that your pull request title is sufficiently descriptive of the changes made.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# eps-FHIR-validator-lambda
22

3-
![Build](https://github.com/NHSDigital/eps-FHIR-validator-lambda/workflows/release/badge.svg?branch=main)
3+
![Build](https://github.com/NHSDigital/eps-FHIR-validator-lambda/actions/workflows/ci.yml/badge.svg?branch=main)
4+
Release history can be found ot https://github.com/NHSDigital/eps-FHIR-validator-lambda/releases. Descriptions for the types of changes in a release can be found in the [contributing guidelines](./CONTRIBUTING.md)
5+
Deployment history can be found at https://nhsdigital.github.io/eps-FHIR-validator-lambda/
46

57
This contains a cloud formation stack which contains a lambda which can be used to validate FHIR R4 messages against implementation guides on [Simplifier](https://simplifier.net/).
68

@@ -200,3 +202,9 @@ These are used to do common commands
200202
Some pre-commit hooks are installed as part of the install above, to run basic lint checks and ensure you can't accidentally commit invalid changes.
201203
The pre-commit hook uses python package pre-commit and is configured in the file .pre-commit-config.yaml.
202204
A combination of these checks are also run in CI.
205+
206+
207+
### Github pages
208+
209+
We use github pages to display deployment information. The source for github pages is in the gh-pages branch.
210+
As part of the ci and release workflows, the release tag (either the short commit SHA or release tag) is appended to _data/{environment}_releases.csv so we have a history of releases and replaced in _data/{environment}_latest.csv so we now what the latest released version is

RELEASE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Release
2+
3+
Managing versioning and releases is done using [semantic-release](https://semantic-release.gitbook.io/semantic-release/). This is a tool that automatically determines the next version number based on the commit history. It also automatically creates a release and publishes it to GitHub and npm.
4+
5+
## Commit messages
6+
7+
Commit messages must follow a commit format inspired by the [esLint conventional commit](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint) format. This is enforced with a github workflow on all pull requests. The format is as follows:
8+
9+
```text
10+
<tag>: [ticket/dependabot] - <description>
11+
12+
Eg:
13+
Docs: [AEA-1234] - Update README.md
14+
Upgrade: [dependabot] - Bump pip-licenses from 4.3.3 to 4.3.4
15+
```
16+
17+
Supported tags and their meanings are defined in the [contributing guidelines](./CONTRIBUTING.md).
18+
19+
## Running a release
20+
21+
Once all desired pull requests have been merged to `main`, a release can be run using the `Release to environments` workflow. This will:
22+
23+
- Run quality checks on the code, including license checks, linting, and unit tests.
24+
- Run semantic-release to determine the next version number and create a release.
25+
- Deploy the release to environments.

0 commit comments

Comments
 (0)