Skip to content

Commit 5160e78

Browse files
committed
fix: updated workflow conditions
1 parent 66c665e commit 5160e78

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/pr_validation.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ on:
33
workflow_call: # Required for reusable workflows
44
inputs:
55
allowed_types:
6-
description: 'Allowed commit types'
6+
description: 'Optional comma-separated types (default: all standard types)'
77
type: string
8-
default: 'fix,feat,docs,ci,chore,test,refactor,style,perf,build,revert'
8+
default: ''
99
require_scope:
1010
description: 'Require scope in PR titles'
1111
type: boolean
@@ -27,7 +27,8 @@ jobs:
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
with:
30-
types: ${{ inputs.allowed_types }}
30+
types: |
31+
${{ inputs.allowed_types != '' && fromJSON(format('["{0}"]', inputs.allowed_types)).join('\n') || 'feat\nfix\ndocs\nci\nchore\ntest\nrefactor\nstyle\nperf\nbuild\nrevert' }}
3132
requireScope: ${{ inputs.require_scope }}
3233
wip: ${{ inputs.allow_wip }}
3334

@@ -40,4 +41,5 @@ jobs:
4041
- uses: webiny/[email protected]
4142
with:
4243
subject_case: false
43-
types: ${{ inputs.allowed_types }}
44+
types: |
45+
${{ inputs.allowed_types != '' && fromJSON(format('["{0}"]', inputs.allowed_types)).join('\n') || 'feat\nfix\ndocs\nci\nchore\ntest\nrefactor\nstyle\nperf\nbuild\nrevert' }}

0 commit comments

Comments
 (0)