-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (47 loc) · 1.94 KB
/
Copy pathpr-checks.yml
File metadata and controls
53 lines (47 loc) · 1.94 KB
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
name: PR checks
on:
pull_request: # support target PR changes for labelling
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read # This is required for the label PR action
pull-requests: write # This is required for the label PR action
issues: write # Required to create new labels
jobs:
validate-pr-title:
# Run only when the PR comes from the same repository, not from a fork
#if: github.event.pull_request.head.repo.full_name == github.repository
name: Validate PR
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: PR Conventional Commit Validation
uses: ytanikin/pr-conventional-commits@1.5.2
with:
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
add_label: 'true'
#custom_labels: '{"feat": "feature", "fix": "fix", "docs": "documentation", "test": "test", "ci": "CI/CD", "refactor": "refactor", "perf": "performance", "chore": "chore", "revert": "revert", "wip": "WIP"}'
#add_scope_label: 'true'
token: ${{ secrets.GITHUB_TOKEN }}
labeler:
# Run only when the PR comes from the same repository, not from a fork
#if: github.event.pull_request.head.repo.full_name == github.repository
name: Label PRs
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: Label PRs
id: label-prs
uses: actions/labeler@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true
configuration-path: ".github/labeler.yaml"