WeKnora/.github
wizardchen 9b0b0910ba ci(lint): filter new issues from git instead of the PR patch API
`only-new-issues: true` makes golangci-lint-action ask the GitHub API for
the pull request patch, and that endpoint refuses any diff over 20000
lines:

    failed to fetch pull request patch: RequestError [HttpError]:
    Sorry, the diff exceeded the maximum number of lines (20000):
    {"resource":"PullRequest","field":"diff","code":"too_large"}

The action does not fail on that error — it falls back to linting
everything. With the backlog this repository carries (5672 findings at
the time of writing) the job then reports hundreds of issues in files the
pull request never touched, capped at 50 per linter, and cannot pass no
matter how clean the change is. Tencent/WeKnora#3470 hit this at 28050
diff lines.

golangci-lint computes the same filter itself with --new-from-merge-base,
which reads git rather than the API and has no size limit. `fetch-depth: 0`
on the checkout is what makes the base commit available, and the changes
job above already relies on it, so nothing else needs to move.

Verified against that pull request's branch: full run reports 5672 issues,
`--new-from-merge-base=<base sha>` reports 0, both from the repository root
and from the cli module directory.
2026-09-20 17:42:43 +08:00
..
ISSUE_TEMPLATE chore(release): v0.6.0 2026-05-21 16:56:19 +08:00
workflows ci(lint): filter new issues from git instead of the PR patch API 2026-09-20 17:42:43 +08:00
dependabot.yml chore(deps): update dependencies in /docreader and adjust dependabot configuration 2026-05-12 14:58:52 +08:00
pull_request_template.md docs: clarify contributor validation workflow 2026-07-28 20:45:30 +08:00