diff --git a/.husky/commit-msg b/.husky/commit-msg index c160a7712..61f50fe36 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,7 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npx --no -- commitlint --edit ${1} +if [ $(git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') = "master" ] && [ $(git remote get-url origin) = "https://github.com/monkeytypegame/monkeytype" ]; then + npx --no -- commitlint --edit ${1} +fi + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00bfa7445..48895cebf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,11 +24,11 @@ If you're looking to make deeper code changes that affect functionality, or will Below are a set of general guidelines for different types of changes. -### Commit Guidelines +### Pull Request Naming Guidelines -We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit messages. This allows us to automatically generate changelogs and version releases. Please follow the guidelines below when writing commit messages. If you are using VSCode, you can install the [Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) extension to help you write commit messages. +We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our pull request titles (and commit messages on the master branch). lease follow the guidelines below when naming pull requests. -For commit types, we use the following: +For types, we use the following: - `feat`: A new feature - `impr`: An improvement to an existing feature @@ -43,40 +43,6 @@ For commit types, we use the following: - `revert`: Reverts a previous commit - `chore`: Other changes that don't apply to any of the above -For example: - -``` -feat: add freedom mode - -Added freedom mode which allows the user to backspace to previous words, even if they are typed correctly -``` - -``` -feat(theme): add superuser -``` - -``` -feat(language): add english language -``` - -``` -feat(quote): add five spanish quotes -``` - -``` -fix: funbox not persisting - -Fixed a bug where the fubox styling would not persist across pages due mistakenly removing all classes from the body element - -Fixes #123 -``` - -``` -impr: add more highlight modes - -Added a few more highlight modes: next word, next two words, next three words -``` - ### Theme Guidelines