-
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.
- Loading branch information
Showing
2 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
The `pull-request-title-validator` GitHub Action helps ensuring that contributors provide informative and well-formatted titles - based on the [conventional-commits] specification. The titles of the pull request could then be used to create automated releases. | ||
|
||
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/ | ||
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/ | ||
|
||
## Example title | ||
|
||
|
@@ -17,7 +17,8 @@ feat(client): add component | |
|
||
The action can be used with both the `pull_request` and `pull_request_target` trigger. | ||
|
||
`default` | ||
### Default | ||
|
||
```yaml | ||
name: validate-pull-request-title | ||
|
||
|
@@ -37,10 +38,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: validate pull request title | ||
uses: kontrolplane/pull-request-title-validator@v1.2.0 | ||
uses: kontrolplane/pull-request-title-validator@v1.3.2 | ||
``` | ||
`custom types` | ||
### Custom types | ||
```yaml | ||
name: validate-pull-request-title | ||
|
||
|
@@ -60,11 +62,38 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: validate pull request title | ||
uses: kontrolplane/pull-request-title-validator@v1.2.0 | ||
uses: kontrolplane/pull-request-title-validator@v1.3.2 | ||
with: | ||
types: "fix,feat,chore" | ||
``` | ||
### Custom scopes | ||
Scopes support regular expression patterns, allowing you to define specific patterns to match the scopes you want to allow. You can also separate multiple scopes using commas. | ||
```yaml | ||
name: validate-pull-request-title | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
validator: | ||
name: validate-pull-request-title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: validate pull request title | ||
uses: kontrolplane/[email protected] | ||
with: | ||
scopes: "api,lang,parser,package/.+" | ||
``` | ||
## contributors | ||
|
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