-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
43 lines (35 loc) · 1.22 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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@v4
- uses: myparcelnl/actions/get-github-token@v4
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 }}