File tree Expand file tree Collapse file tree 2 files changed +50
-2
lines changed
Expand file tree Collapse file tree 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/setup-dart@v1.3
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.
6262husky - commit-msg hook exited with code 1 (add --no-verify to bypass)
6363```
6464
65- ## Setup Github CI
65+ ## Setup Github Actions
6666
67+ ### Validate PR Title
6768Add ` .github/workflows/pr_title.yml `
6869``` yaml
6970on :
8384
8485 - name : Validate Title of PR
8586 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/setup-dart@v1.3
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