Skip to content

Commit d65bd96

Browse files
committed
docs: add instructions and usage to README.md
1 parent c22d827 commit d65bd96

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
# commitlint-pr-action
1+
# Commitlint Github Action
2+
23
Lints Pull Request commits with commitlint
4+
5+
## Usage
6+
7+
Create a github workflow in the `.github` folder, e.g. `.github/workflows/commitlint.yml`:
8+
9+
```yaml
10+
name: Commitlint
11+
on: [pull_request]
12+
13+
jobs:
14+
commitlint:
15+
runs-on: ubuntu-latest
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v1
20+
- uses: wagoid/[email protected]
21+
```
22+
23+
## Inputs
24+
25+
### `configFile`
26+
27+
The path to your commitlint config file. Default `commitlint.config.js`.
28+
29+
## About `extends` in your config file
30+
31+
This is a [`Docker` action](https://github.com/actions/toolkit/blob/e2adf403d6d14a9ca7474976ccaca20f72ff8209/docs/action-types.md#why-would-i-choose-a-docker-action), and was made like this so that you can run it with minimum setup, regardless of your repo's environment. It comes packed with the most famous shared configurations that you can use in your commitlint config's `extends` field:
32+
33+
- [@commitlint/config-angular](./@commitlint/config-angular)
34+
- [@commitlint/config-conventional](./@commitlint/config-conventional)
35+
- [@commitlint/config-lerna-scopes](./@commitlint/config-lerna-scopes)
36+
- [@commitlint/config-patternplate](./@commitlint/config-patternplate)
37+
- [conventional-changelog-lint-config-canonical](https://github.com/gajus/conventional-changelog-lint-config-canonical)
38+
- [commitlint-config-jira](https://github.com/Gherciu/commitlint-jira)
39+
40+
If you have a custom shared config that lies in a private registry, let us know! We will be happy to cover this case if necessary.

0 commit comments

Comments
 (0)