fix: pin golangci-lint version and enable only-new-issues for PRs - #68
Merged
Merged
Conversation
- Pin golangci-lint to v2.1.6 instead of `latest` for reproducibility - Add `only-new-issues: true` so PRs only flag newly introduced issues - Add `fetch-depth: 0` to checkout so git diff works for new-issue detection Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
michaelpeterswa
approved these changes
Apr 14, 2026
This was referenced Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
lintjob ingo_app_pull_requests.ymltakes ~5.5 minutes on repos with large dependency trees (e.g.,Kochava/mcpwith 143 deps). golangci-lint must compile the entire dependency tree for static analysis on every PR run, even when only a handful of files changed.Additionally,
version: latestis used, which the golangci-lint-action README explicitly warns against:Using
latestmeans a new golangci-lint release can break CI across all repos without any code changes, and invalidates the action's cache on every release.Changes
Three targeted changes to the
lintjob only:version: v2.1.6instead oflatest— guarantees reproducible builds and stable cache hitsonly-new-issues: true— PRs only flag lint issues introduced by the PR, not pre-existing debt. This is the recommended configuration for PR checks per the official docs.fetch-depth: 0to the checkout step — required foronly-new-issuesto diff against the base branchImpact
References
only-new-issues🤖 Generated with Claude Code