-
-
Notifications
You must be signed in to change notification settings - Fork 379
59 lines (55 loc) · 1.84 KB
/
conventional_commits.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# AUTO-GENERATED, DO NOT EDIT!
# Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/.github/workflows/conventional_commits.yml
name: Conventional commits
# This GitHub CI Action enforces that pull request titles follow conventional commits.
# More info at https://www.conventionalcommits.org.
#
# The Ory-wide defaults for commit titles and scopes are below.
# Your repository can add/replace elements via a configuration file at the path below.
# More info at https://github.com/ory/ci/blob/master/conventional_commit_config/README.md
on:
pull_request_target:
types:
- edited
- opened
- ready_for_review
- reopened
# pull_request: # for debugging, uses config in local branch but supports only Pull Requests from this repo
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: config
uses: ory/ci/conventional_commit_config@master
with:
config_path: .github/conventional_commits.json
default_types: |
feat
fix
revert
docs
style
refactor
test
build
autogen
security
ci
chore
default_scopes: |
deps
docs
default_require_scope: false
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: ${{ steps.config.outputs.types }}
scopes: ${{ steps.config.outputs.scopes }}
requireScope: ${{ steps.config.outputs.requireScope }}
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject should start with a lowercase letter, yours is uppercase:
"{subject}"