You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check the commit message referenced by \<commit1\>:
189
212
190
213
```sh
191
214
./check.sh <commit1>
@@ -197,85 +220,98 @@ Check all the commits between 2 references:
197
220
./check.sh <commit1>..<commit2>
198
221
```
199
222
200
-
Behind the hood, the script use `git log` to list all the commit thus any syntax allowed by git will be working.
223
+
Behind the hood, the script use `git log` to list all the commit thus any
224
+
syntax allowed by git will be working.
201
225
202
-
You can also use the pre-push commit validator, simply copy, `pre-push`, `validator.sh` and `check.sh` files
226
+
You can also use the pre-push commit validator, simply copy, `pre-push`,
227
+
`validator.sh` and `check.sh` files
203
228
in `.git/hooks` directory of your repository.
204
229
205
-
### OPTIONS
230
+
### Command line Options
206
231
207
-
- if `COMMIT_VALIDATOR_NO_JIRA` environment variable is not empty, no validation is done on JIRA refs.
208
-
- if `COMMIT_VALIDATOR_ALLOW_TEMP` environment variable is not empty, no validation is done on `fixup!` and `squash!` commits.
232
+
- if `COMMIT_VALIDATOR_NO_JIRA` environment variable is not empty,
233
+
no validation is done on JIRA refs.
234
+
- if `COMMIT_VALIDATOR_ALLOW_TEMP` environment variable is not empty,
235
+
no validation is done on `fixup!` and `squash!` commits.
209
236
210
237
### Commit template
211
238
212
-
You might want to use the predefined commit template in order to keep the main information under hand.
239
+
You want to use the predefined commit template to keep the main information
240
+
under hand.
241
+
242
+
For that, you have to add the following lines in your repository's gitconfig
243
+
(located at `<project_root>/.gitconfig`).
213
244
214
-
For that, you have to add the following lines in your repository's gitconfig (located at `<project_root>/.gitconfig`).
215
245
```conf
216
246
[commit]
217
247
template = /path/to/git-commit-template
218
248
```
219
249
220
-
## Getting Started with github action
250
+
## Getting started with github action
221
251
222
-
To enable the action simply create the .github/workflows/commit-message-validator.yml file with the following content:
252
+
To enable the action simply create the
253
+
.github/workflows/commit-message-validator.yml file with the following content:
223
254
224
255
```yml
225
-
name: 'Commit message validation on pull request'
256
+
name: "Commit message validation on pull request"
226
257
227
-
on:
228
-
pull_request
258
+
on: pull_request
229
259
230
260
jobs:
231
261
commit-message-validation:
232
-
233
262
runs-on: ubuntu-latest
234
263
235
264
steps:
236
-
- name: Checkout
237
-
uses: actions/checkout@v2
265
+
- name: Checkout
266
+
uses: actions/checkout@v2
238
267
239
-
- name: Commit message validation
240
-
uses: lumapps/commit-message-validator@master
241
-
env:
242
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
268
+
- name: Commit message validation
269
+
uses: lumapps/commit-message-validator@master
270
+
env:
271
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
243
272
```
244
273
245
-
### OPTIONS
274
+
### Github Action option
246
275
247
276
- if `no_jira` is not empty, no validation is done on JIRA refs.
248
-
- if `allow_temp` is not empty, no validation is done on `fixup!` and `squash!` commits.
277
+
- if `allow_temp` is not empty, no validation is done on `fixup!`
278
+
and `squash!` commits.
249
279
250
280
## Add pre-commit plugin
251
281
252
-
If you are using [pre-commit](https://pre-commit.com/) in you repository, you can add this to your configuration so commit messages are checked locally:
282
+
If you are using [pre-commit](https://pre-commit.com/) in you repository,
283
+
you can add this to your configuration so commit messages are checked locally:
Then run `pre-commit install --hook-type commit-msg` to install the `commit-message-validator`
268
299
269
-
### OPTIONS
300
+
Then run `pre-commit install --hook-type commit-msg` to install the
301
+
`commit-message-validator`
302
+
303
+
### Pre commit hook options
270
304
271
305
- if `no_jira` is set, no validation is done on JIRA refs.
272
-
- if `allow_temp` is set, no validation is done on `fixup!` and `squash!` commits.
306
+
- if `allow_temp` is set, no validation is done on `fixup!` and `squash!`
307
+
commits.
273
308
274
309
<!-- ROADMAP -->
275
310
276
311
## Roadmap
277
312
278
-
See the [open issues](https://github.com/lumapps/commit-message-validator/issues) for a list of proposed features (and known issues).
313
+
See the [open issues](https://github.com/lumapps/commit-message-validator/issues)
314
+
for a list of proposed features (and known issues).
279
315
280
316
- [x] list all the commit, and run validation on each
281
317
- [x] enforce the overall commit message structure
@@ -297,14 +333,15 @@ See the [open issues](https://github.com/lumapps/commit-message-validator/issues
297
333
298
334
## Contributing
299
335
300
-
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
336
+
Contributions are what make the open source community such an amazing place to be
337
+
learn, inspire, and create. Any contributions you make are **greatly appreciated**.
301
338
302
339
1. Fork the Project
303
340
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
304
341
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
305
342
4. Run the tests (`bats -j 100 validator.bats`)
306
-
4. Push to the Branch (`git push origin feature/AmazingFeature`)
307
-
5. Open a Pull Request
343
+
5. Push to the Branch (`git push origin feature/AmazingFeature`)
Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
362
+
<!-- markdownlint-disable no-inline-html -->
363
+
Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a>
364
+
from <a href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
0 commit comments