-
Notifications
You must be signed in to change notification settings - Fork 18
77 lines (73 loc) · 2.15 KB
/
prlint.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: pull-request-lint
on:
pull_request:
types:
- edited
- labeled
- opened
- ready_for_review
- reopened
- synchronize
branches-ignore:
- production
jobs:
validate:
name: Validate PR title
runs-on:
- runs-on=${{ github.run_id }}
- runner=1cpu-linux-arm64
- extras=s3-cache
permissions:
contents: read
pull-requests: write
steps:
# Magic Cache
- uses: runs-on/action@v1
# Check out the repo so that we can dynamically discover the available charts in the repo.
- name: Checkout
uses: actions/checkout@v4
# Verify the PR title against the "types" and "scopes" we allow.
#
# https://github.com/amannn/action-semantic-pull-request#configuration
- uses: amannn/[email protected]
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
types: |
chore
docs
feat
fix
refactor
test
scopes: |
deps
docs
ci
actors
aws
s3
iam
cfn
cloudformation
group
macro
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼
We have changed the repository requirements to now use [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true