Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d65bd96

Browse filesBrowse files
committed
docs: add instructions and usage to README.md
1 parent c22d827 commit d65bd96
Copy full SHA for d65bd96

File tree

Expand file treeCollapse file tree

1 file changed

+39
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+39
-1
lines changed

‎README.md

Copy file name to clipboard
+39-1Lines 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/commitlint-github-action@v1.0.0
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.