CommitWatch
CommitWatch checks commit messages and ensures they're formatted based on your config preferences.
Requirements
Node >= v12
Getting Started
Install the CommitWatch package:
- NPM: npm install commit-watch --save-dev
- Yarn: yarn add commit-watch --dev
You will need to give CommitWatch access to your GitHub Statuses, which can found by clicking HERE and copying the code from the URL.
This will give you your COMMITWATCH_GITHUB_TOKEN. You will need to set this as an environment variable in CI.
CI Variables Needed by CommitWatch:
The most efficient way to get this running is to ensure that some environment variables are available for CommitWatch to find.
COMMITWATCH_GITHUB_TOKENCI_REPO_OWNERCI_REPO_NAMECI_BRANCHCI_COMMIT_SHA
Optional:
COMMIT_WATCH_OUTPUT_DIR, defaults to './artifacts/test_results/commitwatch/'.COMMIT_WATCH_OUTPUT_FILENAME, defaults to 'commitwatch.junit.xml'.
In your CI run node ./node_modules/.bin/commit-watch or yarn commit-watch.
