Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/multimediallc/codeowners-plus

go 1.23.1
go 1.25.0

require (
github.com/bmatcuk/doublestar/v4 v4.10.0
github.com/boyter/gocodewalker v1.5.1
github.com/google/go-github/v63 v63.0.0
github.com/google/go-github/v84 v84.0.0
github.com/pelletier/go-toml/v2 v2.2.4
github.com/sourcegraph/go-diff v0.7.0
github.com/urfave/cli/v3 v3.7.0
)

require (
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/go-querystring v1.2.0 // indirect
golang.org/x/sync v0.12.0 // indirect
)
11 changes: 6 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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/v63 v63.0.0 h1:13xwK/wk9alSokujB9lJkuzdmQuVn2QCPeck76wR3nE=
github.com/google/go-github/v63 v63.0.0/go.mod h1:IqbcrgUmIcEaioWrGYei/09o+ge5vhffGOcxrO0AfmA=
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/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github/v84 v84.0.0 h1:I/0Xn5IuChMe8TdmI2bbim5nyhaRFJ7DEdzmD2w+yVA=
github.com/google/go-github/v84 v84.0.0/go.mod h1:WwYL1z1ajRdlaPszjVu/47x1L0PXukJBn73xsiYrRRQ=
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
4 changes: 2 additions & 2 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,9 @@ func (a *App) requestReviews() error {

func (a *App) printFileOwners(codeOwners codeowners.CodeOwners) {
a.printDebug("File Reviewers:\n")
a.printDebug(a.getFileOwnersMapToString(codeOwners.FileRequired()))
a.printDebug("%s", a.getFileOwnersMapToString(codeOwners.FileRequired()))
a.printDebug("File Optional:\n")
a.printDebug(a.getFileOwnersMapToString(codeOwners.FileOptional()))
a.printDebug("%s", a.getFileOwnersMapToString(codeOwners.FileOptional()))
}

func (a *App) getFileOwnersMapToString(fileReviewers map[string]codeowners.ReviewerGroups) string {
Expand Down
10 changes: 5 additions & 5 deletions internal/app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v63/github"
"github.com/google/go-github/v84/github"
owners "github.com/multimediallc/codeowners-plus/internal/config"
"github.com/multimediallc/codeowners-plus/internal/git"
gh "github.com/multimediallc/codeowners-plus/internal/github"
Expand Down Expand Up @@ -201,7 +201,7 @@ func (m *mockGitHubClient) InitPR(pr_id int) error {
return m.initPRError
}
if m.pr == nil {
m.pr = &github.PullRequest{Number: github.Int(pr_id)}
m.pr = &github.PullRequest{Number: github.Ptr(pr_id)}
}
return nil
}
Expand Down Expand Up @@ -233,7 +233,7 @@ func (m *mockGitHubClient) AddComment(comment string) error {
if m.comments == nil {
m.comments = make([]*github.IssueComment, 0)
}
m.comments = append(m.comments, &github.IssueComment{Body: github.String(comment)})
m.comments = append(m.comments, &github.IssueComment{Body: github.Ptr(comment)})
return nil
}

Expand Down Expand Up @@ -555,8 +555,8 @@ func TestAddReviewStatusComment(t *testing.T) {
},
existingComments: []*github.IssueComment{
{
ID: github.Int64(1),
Body: github.String("Codeowners approval required for this PR:\n[ ] @user1"),
ID: github.Ptr[int64](1),
Body: github.Ptr("Codeowners approval required for this PR:\n[ ] @user1"),
},
},
expectUpdateComment: true,
Expand Down
6 changes: 3 additions & 3 deletions internal/github/gh.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v63/github"
"github.com/google/go-github/v84/github"
"github.com/multimediallc/codeowners-plus/internal/git"
"github.com/multimediallc/codeowners-plus/pkg/codeowners"
f "github.com/multimediallc/codeowners-plus/pkg/functional"
Expand Down Expand Up @@ -411,8 +411,8 @@ func (gh *GHClient) ApprovePR() error {
return &NoPRError{}
}
createReviewOptions := &github.PullRequestReviewRequest{
Event: github.String("APPROVE"),
Body: github.String("Codeowners reviews satisfied"),
Event: github.Ptr("APPROVE"),
Body: github.Ptr("Codeowners reviews satisfied"),
}
_, res, err := gh.client.PullRequests.CreateReview(gh.ctx, gh.owner, gh.repo, gh.pr.GetNumber(), createReviewOptions)
if err != nil {
Expand Down
Loading
Loading