-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pr-validate-title-conventional
- Loading branch information
1 parent
b458c5c
commit ad1b7a4
Showing
2 changed files
with
79 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: 'Validate PR title' | ||
description: 'Validate pull request title based on the conventional commits convention' | ||
|
||
inputs: | ||
token: | ||
description: 'GitHub token to use. If passed, takes precedence over the `app-id` and `app-private-key` inputs.' | ||
|
||
app-id: | ||
description: 'The app ID of the app.' | ||
|
||
private-key: | ||
description: 'The private key of the app.' | ||
|
||
outputs: | ||
success: | ||
description: 'Whether the PR title is valid' | ||
value: ${{ steps.validate.outputs.success }} | ||
|
||
error: | ||
description: 'Error in case the PR title is not valid' | ||
value: ${{ steps.validate.outputs.error }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./get-github-token | ||
id: token | ||
with: | ||
token: ${{ inputs.token }} | ||
app-id: ${{ inputs.app-id }} | ||
private-key: ${{ inputs.private-key }} | ||
|
||
- uses: aslafy-z/conventional-pr-title-action@v3 | ||
id: validate | ||
continue-on-error: true | ||
with: | ||
context-name: 'Validate pull request title' | ||
success-state: 'Title follows conventional commits convention' | ||
failure-state: 'Title does not follow conventional commits convention' | ||
env: | ||
GITHUB_TOKEN: ${{ steps.token.outputs.token }} |