Skip to content

Commit a6a9d6d

Browse files
committed
workflow: improve git hooks setup
1 parent 5191f13 commit a6a9d6d

File tree

6 files changed

+568
-22
lines changed

6 files changed

+568
-22
lines changed

.github/COMMIT_CONVENTION.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-angular/convention.md).
44
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
``` js
10+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
11+
```
12+
513
#### Examples
614

715
Appears under "Features" header, `compiler` subheader:

.github/CONTRIBUTING.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,12 @@ You will need [Node.js](http://nodejs.org) **version 6+** and [Java Runtime Envi
4040
After cloning the repo, run:
4141

4242
``` bash
43-
$ npm install
44-
& npm run setup
43+
$ npm install # or yarn
4544
```
4645

47-
The `setup` script links two git hooks:
48-
49-
- `pre-commit`: runs ESLint on staged files.
50-
- `commit-msg`: validates commit message format (see below).
51-
5246
### Committing Changes
5347

54-
Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. If git hooks have been properly linked, commit messages will be automatically validated upon commit. It is recommended to use `npm run commit` instead of `git commit`, which provides an interactive CLI for generating proper commit messages.
48+
Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages will be automatically validated upon commit. If you are not familiar with the commit message convention, you can use `npm run commit` instead of `git commit`, which provides an interactive CLI for generating proper commit messages.
5549

5650
### Commonly used NPM scripts
5751

0 commit comments

Comments
 (0)