-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (35 loc) · 1.09 KB
/
checker.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
name: "Pull Request Checker"
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
jobs:
check-pull-request-title:
name: Check Pull Request Title
runs-on: ubuntu-latest
steps:
- uses: thehanimo/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr-title-checker-config.json"
check-commit-message-title:
name: Check Commit Message Title
runs-on: ubuntu-latest
steps:
- name: Get PR Commits
id: "get-pr-commits"
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Subject Line Length
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: "^(?:add|update|feat|fix|refactor): (.*) \\( ?https?://([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/? ?\\)"
flags: i
error: "Commit title didn't match rules"