Skip to content

Commit ad1a80e

Browse files
committed
fix GolangCI-lint for large PR
1 parent 2f6ce78 commit ad1a80e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
name: golangci-lint
22
on:
3-
push:
4-
branches:
5-
- main
6-
- master
73
pull_request:
84

95
permissions:
106
contents: read
11-
pull-requests: read
127

138
jobs:
149
golangci:
1510
name: lint
1611
runs-on: ubuntu-latest
1712
steps:
1813
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
filter: blob:none
1917
- uses: actions/setup-go@v6
2018
with:
2119
go-version-file: 'go.mod'
2220
- name: golangci-lint
2321
uses: golangci/golangci-lint-action@v9.2.0
2422
with:
2523
version: v2.7.2
26-
only-new-issues: true
24+
# only-new-issues does not work on large PRs
25+
# https://github.com/golangci/golangci-lint-action/issues/996
26+
args: --new-from-rev=${{ github.event.pull_request.base.sha }}

0 commit comments

Comments
 (0)