2.1.1 • Published 1 year ago

commit-watch v2.1.1

Weekly downloads
145
License
Apache-2.0
Repository
github
Last release
1 year ago

CommitWatch

Maturity badge - level 2 GitHub license Slack workspace

npm node-current npm

Overview

CommitWatch checks commit messages and ensures they conform to the conventional commit spec.

Getting Started

You can install the commit-watch package from npm as a dev dependency:

npm i --save-dev commit-watch

or

yarn add -d commit-watch

Or just run it directly in CI via npx commit-watch or yarn dlx commit-watch.

Before running commit-watch, you need to ensure the relevant environment variables are set. For a full list of required and optional environment variables, see the section below.

Environment Variables:

NameValueDescription
COMMITWATCH_GITHUB_TOKENRequiredPersonal access token with write access to GitHub status checks, and read access to your repository.
CI_REPO_OWNERRequiredThe "owner" from https://github.com/\<owner>/\<name>.
CI_REPO_NAMERequiredThe "name" from https://github.com/\<owner>/\<name>. That is, your repository name.
CI_COMMIT_SHARequiredThe commit sha to run the linter against.
CI_BASE_BRANCHDefaults to origin/master.The base branch to compare the commit sha against.
COMMIT_WATCH_OUTPUT_DIRDefaults to ./artifacts/test_results/commitwatch/.Directory to write the junit report to.
COMMIT_WATCH_OUTPUT_FILENAMEDefaults to commitwatch.junit.xml.The name of the junit report.
VERBOSEDefaults to 0.Whether to enable verbose mode.

Contributing

Ensure you are using the correct version of node. It should match the version specified in .nvmrc. You can use a tool such as nvm to automate this process.

Install packages:

yarn

To install the git hooks:

yarn husky install

To run tests:

yarn test

And watch mode:

yarn test:watch

You can build the package via:

yarn build

Set the CI=1 env variable to generate a test coverage report.

Feel free to open a PR or GitHub issue. Contributions welcome!

License

CommitWatch is licensed under Apache License Version 2.0.

1.0.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

0.3.0

2 years ago

0.2.1

3 years ago

0.1.0

3 years ago

0.2.0

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

4 years ago

0.0.7

4 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago