File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 22
22
go-version : ${{ matrix.go }}
23
23
24
24
- name : Check out code into the Go module directory
25
- uses : actions/checkout@v2
25
+ uses : actions/checkout@v3
26
+ with :
27
+ # By default, the checkout action only fetches the last commit,
28
+ # but we want to run DCO check against all commit messages.
29
+ # Assuming that a pull request may have multiple commits,
30
+ # fetching the single commit doesn't work for us.
31
+ #
32
+ # While DCO check (on Makefile) checks latest 5 commits,
33
+ # the checkout action automatically creates a merge commit
34
+ # for merging "main" into a pull request branch.
35
+ # In addition to that, Git cannot recognize merge commits when
36
+ # one of the parents is missing.
37
+ # So, we will fetch 15 commits just in case to have
38
+ # 5 actual commits with associated merged commits.
39
+ fetch-depth : 15
26
40
27
41
- name : Run static analysis
28
42
run : make lint
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ $(BINPATH)/golangci-lint:
58
58
59
59
lint : $(BINPATH ) /ltag $(BINPATH ) /git-validation $(BINPATH ) /golangci-lint
60
60
$(BINPATH ) /ltag -v -t ./.headers -check
61
- $(BINPATH ) /git-validation -q -run DCO,short-subject -range HEAD~3 ..HEAD
61
+ $(BINPATH ) /git-validation -q -run DCO,short-subject -range HEAD~5 ..HEAD
62
62
$(BINPATH ) /golangci-lint run
63
63
64
64
clean :
You can’t perform that action at this time.
0 commit comments