-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from matmar10/rename
docs: add README, logo, & rename package
- Loading branch information
Showing
6 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Test the action locally | ||
uses: ./ | ||
uses: matmar10/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,61 @@ | ||
# pr-conventional-commit | ||
Enforce conventional commits against multiple commits within a single PR | ||
![Prcolinter](https://github.com/matmar10/prcolinter/blob/master/logo.png?raw=true "Percolinter PR Conventional Commit Linter") | ||
|
||
Easily lint _each_ commit for your PRs against the [Conventional Commit](https://www.conventionalcommits.org/) spec based on [configurable Linter rules](https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md). | ||
|
||
**Brew up a stronger commit history!** | ||
|
||
## Quick Start | ||
|
||
```yaml | ||
name: Conventional Commit | ||
|
||
on: | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
jobs: | ||
lint-commits: | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: matmar10/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
## Custom rules | ||
By default, it uses [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/index.js) rules. | ||
Add a JSON file under `.github/prcolinterrc.json` to define your customer rules: | ||
|
||
```json | ||
{ | ||
"rules": { | ||
"body-max-line-length": [2, "always", 300], | ||
} | ||
} | ||
``` | ||
|
||
-- or -- | ||
|
||
You can use or customize any of the [Commitlint rules listed here](https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md) | ||
|
||
You can also define custom rules inline: | ||
|
||
```yaml | ||
name: Conventional Commit | ||
on: | ||
pull_request: | ||
branches: [ '*' ] | ||
jobs: | ||
lint-commits: | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: matmar10/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# NOTE: the use of a string, not an object because github doesn't support objects as args | ||
rules: '{"body-max-line-length": [2, "always", 300]}' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters