Comments (2)
Golangci-lint is already triggered when a PR is created or updated.
Documentation about pull_request_review
event.
- prevent any malicious code from triggering your GitHub Actions
This should be handled inside the GitHub repository configuration.
https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks
- cuts down the total billable minutes (since you're only running lints on pull request approvals and not on every update to the PR)
This only applies to private repositories so your first argument doesn't fit.
Anyway, pull_request_review
is not for approval but for reviews.
Even if you restrict only on approval (i.e. submitted
+ if: github.event.review.state == 'APPROVED'
), this means you will approve a PR without having the result of the linting, this doesn't make sense.
If you think of another activity type (ex: edited
), it's the same thing but worse.
To cut down the total billable minutes:
- run golangci-lint locally before a push (and before a commit), the cache will do the job.
- don't push half-done work
You want to launch golangci-lint on demand but your proposal (pull_request_review
) is a bad approach.
from golangci-lint-action.
You want to launch golangci-lint on demand but your proposal (pull_request_review) is a bad approach.
@ldez Would love to hear any alternatives you have in mind
from golangci-lint-action.
Related Issues (20)
- tags v3.7.1 / v4 / v4.0.0 but no release HOT 2
- Add release notes for v4.0.0 HOT 1
- bump action runtime to `node20` HOT 1
- Execution time takes too long with deafult GO111MODULE=on HOT 3
- cache upload hangs for 2 minutes after work is done HOT 2
- When a patch cannot be downloaded and `only-new-issues` is set, error instead of running HOT 3
- Make this action verified by GitHub HOT 2
- Problems when working with big diffs, such as vendored repository changes HOT 1
- golangci-lint-action failed on Push due to unable fetching commit diffs with --only-new-issues set HOT 2
- Dependabot PRs fail CI because it ignore only new issues HOT 21
- invalid go version '1.21.9': must match format 1.23\n" HOT 3
- Support install-mode: none HOT 6
- `typecheck` not working with `go:embed` HOT 3
- Configurable cache key HOT 2
- Severity
- Static type checks doesn't include embedded types with github action HOT 6
- Support for module plugin system via .custom-gcl.yml HOT 9
- github-actions is deprecated warning HOT 1
- Does not work on go 1.23 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golangci-lint-action.