Skip to content

Commit e54fbb1

Browse files
authored
feat(semantic_pull_request): add types and scopes inputs (#65)
1 parent 97da6e9 commit e54fbb1

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434

3535
verify-semantic-pull-request:
3636
uses: ./.github/workflows/semantic_pull_request.yml
37+
with:
38+
scopes: "dart_package, flutter_package, pana, semantic_pull_request"
3739

3840
verify-spell-check:
3941
uses: ./.github/workflows/spell_check.yml

.github/workflows/semantic_pull_request.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: Semantic Pull Request Workflow
22

3-
on: workflow_call
3+
on:
4+
workflow_call:
5+
inputs:
6+
types:
7+
required: false
8+
type: string
9+
scopes:
10+
required: false
11+
type: string
412

513
jobs:
614
build:
@@ -13,6 +21,8 @@ jobs:
1321
env:
1422
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1523
with:
24+
types: ${{inputs.types}}
25+
scopes: ${{inputs.scopes}}
1626
validateSingleCommit: false
1727
ignoreLabels: |
1828
bot

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ jobs:
208208

209209
## Semantic Pull Request Workflow
210210

211+
### Inputs
212+
213+
#### `types`
214+
215+
**Optional** Configure which types are allowed (e.g. `"feat, fix, docs"`).
216+
217+
**Note**: If not set then the action uses the list of Conventional Commits type of the [commitizen][commitizen].
218+
219+
#### `scopes`
220+
221+
**Optional** Configure which scopes are allowed (e.g. `"dart_package, flutter_package"`).
222+
211223
### Steps
212224

213225
The semantic pull request package workflow consists of the following steps:
@@ -352,3 +364,4 @@ jobs:
352364
[very_good_ventures_link_light]: https://verygood.ventures#gh-light-mode-only
353365
[very_good_ventures_link]: https://verygood.ventures
354366
[very_good_workflows_blog_link]: https://verygood.ventures/blog/configuring-workflows-for-your-flutter-projects?utm_source=github&utm_medium=readme&utm_campaign=workflows_readme
367+
[commitizen]: https://github.com/commitizen/conventional-commit-types

0 commit comments

Comments
 (0)