From 68117e404d337f077049b8612b6b2d70f9a2638d Mon Sep 17 00:00:00 2001 From: Aaron Russo Date: Wed, 5 Apr 2023 11:25:00 -0700 Subject: [PATCH] docs: Add commit message standards to contrib docs Remove similar section from maintainer docs --- CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ MAINTAINING.md | 16 ++-------------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49fe11e..71a2bdc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,3 +82,33 @@ This section guides you through making a successful pull request. * Someone will review your PR and ensure it meets these guidelines. If it does not, we will ask you to fix the identified issues. + +### Commit Messages + +Commit subjects should begin with the following prefix `:`, where type is +one of the following change types: + +- `feat` adds a new feature or expands upon existing behavior +- `fix` for changes that resolve an error in our code +- `docs` for documentation updates +- `chore` for changes related to project maintenance, such as github actions or linter configurations. +- `revert` for a commit that reverts another commit +- `test` for adding missing tests + +When multiple change types are present (ie. a new feature is created and as a result fixes a bug), you should use `feat`. + +If a change addresses one or more issues, be sure and include `Closes #1, #2, +...` as a dedicated line at the end of your commit body. + +An example commit may look like: + +``` +feat: Add support for a custom command channel size + +Create an additional functional option `WithCommandChanSize(int)` that +may be passed into `NewClient(...)` that lets the user specify the +size of the channel used to hold incoming commands to be processed. This +may be useful to expand for high-volume bots. + +Closes #319 +``` diff --git a/MAINTAINING.md b/MAINTAINING.md index 7a95b44..95167e5 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -18,17 +18,5 @@ those that start with `fix:` will be grouped into a "Bug fixes" section. Commits that begin with `chore:` or `docs:` will be excluded, and all others will be added to an "Others" section in the changelog. -When reviewing pull requests or committing code, it is strongly encouraged to -use one of the aformentioned prefixes so that changelogs are nicely formatted -and organized. - -## Commit Messages - -To maintain a tidy changelog on release, we should encourage the use of the -following commit subject prefixes (see the Changelogs for details on how they -are used) - -- `feat`: New features -- `fix`: Bug fixes -- `docs`: Usage documentation changes (ie. examples, README) -- `chore`: Housekeeping taks that don't touch code or usage docs +For more details on commit message formatting see the +[CONTRIBUTING](./CONTRIBUTING.md) doc.