docs: Update Git commit message guidelines (#2639)

Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
Jonah Aragon 2024-07-15 14:17:14 +00:00 committed by Daniel Gray
parent 7e0218b082
commit 34ae172d92
No known key found for this signature in database
GPG Key ID: 41911F722B0F9AE3

View File

@ -4,6 +4,26 @@ title: Commit Messages
For our commit messages we follow the style provided by [Conventional Commits](https://conventionalcommits.org). Not all of those suggestions are appropriate for Privacy Guides, so the main ones we use are:
## Update to existing text
This example could be used for an item already on the site, but includes a minor update to the description.
```text
update: Add mention of security audit (#0000)
```
## Addition or removal of recommendations/pages
This example is for the addition or removal of an item. You may elaborate why it was removed in the commit paragraph below. Note the extra `!` to draw attention to a major change.
```text
update!: Remove foobar (#0000)
Foobar was removed due to it having numerious security issues and being unmaintained.
```
You can actually add a `!` to *any* of the types on this page to denote particularly large changes, but this is generally where it will be most appropriate.
## Commit message with correction
We use `fix` for simple things like spelling mistakes or site related bugs. These things will usually have the `correction` or `bug` label on GitHub.
@ -12,24 +32,6 @@ We use `fix` for simple things like spelling mistakes or site related bugs. Thes
fix: Correct spelling on XYZ page (#0000)
```
## Update to site
This example is for a removal of an item (but could also be used for an addition); you may elaborate why it was removed in the commit paragraph below. It can also be used for the addition of any new pages.
```text
update: Remove foobar (#0000)
Foobar was removed due to it having numerious security issues and being unmaintained.
```
## Update to specific item
This example could be used for an item already on the site, but includes a minor update to the description.
```text
foobar: Add mention of security audit (#0000)
```
## Feature/enhancement
For new features or enhancements to the site, e.g. things that have the `enhancements` label on GitHub, it may be appropriate to signify these with:
@ -40,10 +42,30 @@ feat: Add blah blah (#0000)
This change adds the forum topics to the main page
```
## Module update
## Development-related types
Dependency updates follow the normal recommendations of beginning with:
These commit types are typically used for changes that won't be visible to the general audience.
We use `docs:` to denote changes to the developer documentation for this website, including (but not limited to) for example the README file, or most pages in `/docs/about` or `/docs/meta`:
```text
chore: Bump modules/mkdocs-material from 463e535 to 621a5b8
docs: Update Git commit message guidelines (#0000)
```
We use `build:` for commits related to our build process, mainly dependency updates.
```text
build: Bump modules/mkdocs-material from 463e535 to 621a5b8
```
We use `ci:` for commits related to GitHub Actions, DevContainers, or other automated build platforms.
```text
ci: Update Netlify config (#0000)
```
We use `refactor:` for changes which neither fix a bug nor add a feature.
```text
refactor: Move docs/assets to theme/assets
```