File tree 2 files changed +50
-2
lines changed
2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ pull_request :
3
+ branches : [ "main" ]
4
+ types : [opened, synchronize]
5
+
6
+ jobs :
7
+ validate :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v3
11
+ with :
12
+ fetch-depth : 0
13
+ ref : ${{ github.head_ref }}
14
+
15
+ -
uses :
dart-lang/[email protected]
16
+
17
+ - name : Get Dependencies
18
+ run : dart pub get
19
+
20
+ - name : Validate PR Commits
21
+ run : VERBOSE=true dart run commitlint_cli --from="origin/${{ github.base_ref }}" --to="${{ github.head_ref }}" --config lib/commitlint.yaml
Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ No staged files match any of provided globs.
62
62
husky - commit-msg hook exited with code 1 (add --no-verify to bypass)
63
63
```
64
64
65
- ## Setup Github CI
65
+ ## Setup Github Actions
66
66
67
+ ### Validate PR Title
67
68
Add ` .github/workflows/pr_title.yml `
68
69
``` yaml
69
70
on :
83
84
84
85
- name : Validate Title of PR
85
86
run : echo ${{ github.event.pull_request.title }} | dart run commitlint_cli
86
- ` ` `
87
+ ` ` `
88
+
89
+ ### Validate PR Commits
90
+ Add ` .github/workflows/pr_commits.yml`
91
+ ` ` ` yaml
92
+ on:
93
+ pull_request:
94
+ branches: [ "main" ]
95
+ types: [opened, synchronize]
96
+
97
+ jobs:
98
+ validate:
99
+ runs-on: ubuntu-latest
100
+ steps:
101
+ - uses: actions/checkout@v3
102
+ with:
103
+ fetch-depth: 0
104
+ ref: ${{ github.head_ref }}
105
+
106
+ - uses: dart-lang/[email protected]
107
+
108
+ - name: Get Dependencies
109
+ run: dart pub get
110
+
111
+ - name: Validate PR Commits
112
+ run: dart run commitlint_cli --from="origin/${{ github.base_ref }}" --to="${{ github.head_ref }}"
113
+ ` ` `
You can’t perform that action at this time.
0 commit comments