File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 push :
44 pull_request :
55
6+ permissions :
7+ contents : write
8+ pull-requests : write
9+
610jobs :
711 lint :
812 runs-on : ubuntu-latest
9- permissions :
10- contents : write
11-
1213 steps :
1314 - uses : actions/checkout@v5
1415 with :
@@ -20,11 +21,38 @@ jobs:
2021 go-version : 1.25.1
2122
2223 - name : Run go mod tidy
23- run : go mod tidy
24+ run : |
25+ go mod tidy
2426
2527 - name : Install & run golangci-lint
2628 uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
2729 with :
2830 version : latest
2931 install-mode : " goinstall"
30- args : --fix
32+ args : --enable godot --fix
33+
34+ - name : Auto-commit lint fixes
35+ id : auto_commit
36+ if : github.event_name == 'pull_request'
37+ uses : stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
38+ with :
39+ commit_message : Auto-fix from ${{ github.workflow }}/${{ github.job }} job
40+ commit_user_name : github-actions[bot]
41+ commit_user_email : noreply@github.com
42+ push_options : --force
43+
44+ - name : Comment on PR about auto-commit
45+ if : github.event_name == 'pull_request' && steps.auto_commit.outputs.changes_detected == 'true'
46+ uses : actions/github-script@v8
47+ with :
48+ script : |
49+ github.rest.issues.createComment({
50+ issue_number: context.issue.number,
51+ owner: context.repo.owner,
52+ repo: context.repo.repo,
53+ body: `
54+ **Auto-fix applied from ${{ github.workflow }}/${{ github.job }} job**
55+
56+ * Workflow run: ${{ github.repositoryUrl }}/actions/runs/${{ github.run_id }}
57+ * Fix commit: ${{ github.repositoryUrl }}/commit/${{ steps.auto_commit.outputs.commit_hash }}
58+ `})
Original file line number Diff line number Diff line change @@ -44,3 +44,7 @@ func NotNilPtr[T any](name string, value *T) *T {
4444 lo .Assertf (value != nil , "%s should not be a nil pointer" , name )
4545 return value
4646}
47+
48+ // bla
49+ func _ () {
50+ }
You can’t perform that action at this time.
0 commit comments