Skip to content

Commit

Permalink
Merge branch 'main' into patch
Browse files Browse the repository at this point in the history
  • Loading branch information
levivannoort authored Nov 29, 2024
2 parents d36220e + deb253c commit 756ab0d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ branding:
runs:
using: "docker"
image: "Dockerfile"

inputs:
types:
description: 'Comma-separated list of valid commit types'
required: false
default: 'fix,feat,chore,docs,build,ci,refactor,perf,test'
scopes:
description: 'Comma-separated list of valid scopes'
required: false
default: ''

0 comments on commit 756ab0d

Please sign in to comment.