Skip to content

Commit

Permalink
chore: update dependencies, linter, and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Dec 24, 2024
1 parent 87f109d commit feb05d4
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.59.1
GOLANGCI_LINT_VERSION: v1.62.2
CGO_ENABLED: 0

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

# https://goreleaser.com/ci/actions/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ linters-settings:
linters:
enable-all: true
disable:
- execinquery # deprecated
- gomnd # deprecated
- exportloopref # deprecated
- cyclop # duplicate of gocyclo
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

project_name: mjolnir

builds:
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/ldez/gha-mjolnir

go 1.21.0
go 1.22.0

require (
github.com/google/go-github/v62 v62.0.0
github.com/ldez/ghactions v1.10.0
github.com/google/go-github/v68 v68.0.0
github.com/ldez/ghactions v1.11.0
)

require (
github.com/google/go-querystring v1.1.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v62 v62.0.0 h1:/6mGCaRywZz9MuHyw9gD1CwsbmBX8GWsbFkwMmHdhl4=
github.com/google/go-github/v62 v62.0.0/go.mod h1:EMxeUqGJq2xRu9DYBMwel/mr7kZrzUOfQmmpYrZn2a4=
github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s=
github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/ldez/ghactions v1.10.0 h1:7Q0tYHdpPDhNwq2HzxypCfL/jBWFQa7UDD+I0JoNiGk=
github.com/ldez/ghactions v1.10.0/go.mod h1:Vnd6ljT2XC/O6CkSckTQiiFsKlw+h6qtM6n9FOoHMEc=
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
github.com/ldez/ghactions v1.11.0 h1:kU5qgCIgjw90nv9h24NFRDz4tVwwZBYCSeiB0UBeJEQ=
github.com/ldez/ghactions v1.11.0/go.mod h1:HPIHAbCG/cZwhQT7dSTVmxIUPUF29BRgXs9uyCRaO6Q=
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"log"

"github.com/google/go-github/v62/github"
"github.com/google/go-github/v68/github"
"github.com/ldez/ghactions"
)

Expand Down
6 changes: 3 additions & 3 deletions mjolnir.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/google/go-github/v62/github"
"github.com/google/go-github/v68/github"
)

var (
Expand Down Expand Up @@ -61,7 +61,7 @@ func closeIssue(ctx context.Context, client *github.Client, owner string, reposi

issueRequest := &github.IssueRequest{
Milestone: milestone,
State: github.String("closed"),
State: github.Ptr("closed"),
}

_, _, err := client.Issues.Edit(ctx, owner, repositoryName, issueNumber, issueRequest)
Expand All @@ -70,7 +70,7 @@ func closeIssue(ctx context.Context, client *github.Client, owner string, reposi

func addComment(ctx context.Context, client *github.Client, owner string, repositoryName string, issueNumber int, message string) error {
issueComment := &github.IssueComment{
Body: github.String(message),
Body: github.Ptr(message),
}
_, _, err := client.Issues.CreateComment(ctx, owner, repositoryName, issueNumber, issueComment)
return err
Expand Down
1 change: 0 additions & 1 deletion mjolnir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func Test_parseIssueFixes(t *testing.T) {
}

for _, test := range testCases {
test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit feb05d4

Please sign in to comment.