Skip to content

Commit e739f38

Browse files
committed
build(deps): update gogithub to v0.16.0, drop direct go-github dependency
publish/github.Client now wraps gogithub/clientv1.Client instead of a raw *github.Client; CreatePR returns *gogithub.PullRequest. github.com/google/go-github is now only a transitive dependency.
1 parent 1c17dae commit e739f38

4 files changed

Lines changed: 28 additions & 27 deletions

File tree

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ module github.com/plexusone/assistantkit
33
go 1.26.0
44

55
require (
6-
github.com/google/go-github/v88 v88.0.0
7-
github.com/grokify/gogithub v0.14.0
6+
github.com/grokify/gogithub v0.16.0
87
github.com/pelletier/go-toml/v2 v2.4.3
98
github.com/plexusone/multi-agent-spec v0.9.0
109
github.com/spf13/cobra v1.10.2
@@ -13,8 +12,8 @@ require (
1312

1413
require (
1514
github.com/bahlo/generic-list-go v0.2.0 // indirect
16-
github.com/buger/jsonparser v1.2.0 // indirect
17-
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
15+
github.com/buger/jsonparser v1.6.1 // indirect
16+
github.com/google/go-github/v89 v89.0.0 // indirect
1817
github.com/google/go-querystring v1.2.0 // indirect
1918
github.com/grokify/mogo v0.74.6 // indirect
2019
github.com/huandu/xstrings v1.5.0 // indirect
@@ -25,7 +24,7 @@ require (
2524
github.com/valyala/bytebufferpool v1.0.0 // indirect
2625
github.com/valyala/quicktemplate v1.8.0 // indirect
2726
go.yaml.in/yaml/v4 v4.0.0-rc.6 // indirect
28-
golang.org/x/exp v0.0.0-20260718201538-764159d718ef // indirect
27+
golang.org/x/exp v0.0.0-20260727155853-b88d891fe743 // indirect
2928
golang.org/x/oauth2 v0.36.0 // indirect
3029
golang.org/x/text v0.40.0 // indirect
3130
)

go.sum

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
22
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
3-
github.com/buger/jsonparser v1.2.0 h1:4EFcvK1kD4jyj6YqNK6skK6w+y7FHHBR+XBCtxwu/6g=
4-
github.com/buger/jsonparser v1.2.0/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
3+
github.com/buger/jsonparser v1.6.1 h1:I0phFv0PlbLHnM7TZAVjZ2MJ2/eWRTDyuO7GLR98IEs=
4+
github.com/buger/jsonparser v1.6.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
55
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
66
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
77
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8-
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
9-
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
108
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
119
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
1210
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
13-
github.com/google/go-github/v88 v88.0.0 h1:dZA9IKkPK1eXZj4ypngnpRj5FwdpTv4whix2PrQMP7M=
14-
github.com/google/go-github/v88 v88.0.0/go.mod h1:rufTDgn2N45wjhukLTyxmvc9nilSp3mr3Rgtt6b1MPw=
11+
github.com/google/go-github/v89 v89.0.0 h1:35bEK5XoEcF3PZrlVbl9XN63f5BcJRA/UGkxeC9xPg0=
12+
github.com/google/go-github/v89 v89.0.0/go.mod h1:QLcbU0ipeAqQuR5KSg8c2lql4Qk1EwJ2dWz/0rP4Nho=
1513
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
1614
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
17-
github.com/grokify/gogithub v0.14.0 h1:p1lLcOMsN2BsXF9JWg3Zz+sp0B0fsZhmFDRjlTsTSks=
18-
github.com/grokify/gogithub v0.14.0/go.mod h1:At/GqPjhN1Te1fyqxzbgN28jDOIJbPhS0qttDatsvNs=
15+
github.com/grokify/gogithub v0.16.0 h1:bjwaiuh0j45ctT4FOhbhsuVl6vg24bFC1n/CpjvKCPU=
16+
github.com/grokify/gogithub v0.16.0/go.mod h1:r3c5J6UKCTv1vigQkulpeZGXfH3+EQ5540GZxGPVgbU=
1917
github.com/grokify/mogo v0.74.6 h1:isdwQOfayT1E9w4il4btc2on6KY72VZnjRaRAka2iXY=
2018
github.com/grokify/mogo v0.74.6/go.mod h1:MUheNHoi0hatrQbS60W61CMOkcu/yYRbOQBkNnJCUQY=
2119
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
@@ -47,8 +45,8 @@ github.com/valyala/quicktemplate v1.8.0/go.mod h1:qIqW8/igXt8fdrUln5kOSb+KWMaJ4Y
4745
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
4846
go.yaml.in/yaml/v4 v4.0.0-rc.6 h1:1h7H1ohdUh93/FyE4YaDa1Zh64K6VVbjF4K6WUxMtH4=
4947
go.yaml.in/yaml/v4 v4.0.0-rc.6/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
50-
golang.org/x/exp v0.0.0-20260718201538-764159d718ef h1:LkZ48HFgy/TvhTI0bcWkjgFkgLyKUwcTbDjS0DUjw+A=
51-
golang.org/x/exp v0.0.0-20260718201538-764159d718ef/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q=
48+
golang.org/x/exp v0.0.0-20260727155853-b88d891fe743 h1:ex206bKw+v3K0dm3andkrIF+ijyQKJG1pLgwQ2PYdQM=
49+
golang.org/x/exp v0.0.0-20260727155853-b88d891fe743/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q=
5250
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
5351
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
5452
golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=

publish/claude/marketplace.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ func (p *Publisher) Publish(ctx context.Context, opts core.PublishOptions) (*cor
187187
}
188188

189189
return &core.PublishResult{
190-
PRURL: pr.GetHTMLURL(),
191-
PRNumber: pr.GetNumber(),
190+
PRURL: pr.HTMLURL,
191+
PRNumber: pr.Number,
192192
Branch: branch,
193193
ForkURL: fmt.Sprintf("https://github.com/%s/%s", forkOwner, forkRepo),
194194
Status: status,

publish/github/client.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ package github
55
import (
66
"context"
77

8-
"github.com/google/go-github/v88/github"
9-
"github.com/grokify/gogithub/auth"
8+
"github.com/grokify/gogithub"
9+
"github.com/grokify/gogithub/clientv1"
1010
"github.com/grokify/gogithub/pr"
1111
"github.com/grokify/gogithub/repo"
1212
)
1313

1414
// Client wraps the GitHub API client with marketplace-specific operations.
1515
type Client struct {
16-
gh *github.Client
16+
gh clientv1.Client
1717
dryRun bool
1818
}
1919

2020
// NewClient creates a new GitHub client with the given token.
2121
func NewClient(token string) (*Client, error) {
22-
gh, err := auth.NewGitHubClient(context.Background(), token)
22+
gh, err := clientv1.NewClient(context.Background(), token)
2323
if err != nil {
2424
return nil, err
2525
}
@@ -33,7 +33,11 @@ func (c *Client) SetDryRun(dryRun bool) {
3333

3434
// GetAuthenticatedUser returns the authenticated user's login.
3535
func (c *Client) GetAuthenticatedUser(ctx context.Context) (string, error) {
36-
return auth.GetAuthenticatedUser(ctx, c.gh)
36+
user, err := c.gh.GetAuthenticatedUser(ctx)
37+
if err != nil {
38+
return "", err
39+
}
40+
return user.Login, nil
3741
}
3842

3943
// EnsureFork ensures a fork exists for the given repository.
@@ -75,12 +79,12 @@ func (c *Client) CreateCommit(ctx context.Context, owner, repoName, branch, mess
7579
}
7680

7781
// CreatePR creates a pull request.
78-
func (c *Client) CreatePR(ctx context.Context, upstreamOwner, upstreamRepo, forkOwner, branch, baseBranch, title, body string) (*github.PullRequest, error) {
82+
func (c *Client) CreatePR(ctx context.Context, upstreamOwner, upstreamRepo, forkOwner, branch, baseBranch, title, body string) (*gogithub.PullRequest, error) {
7983
if c.dryRun {
80-
return &github.PullRequest{
81-
HTMLURL: github.Ptr("https://github.com/" + upstreamOwner + "/" + upstreamRepo + "/pull/0"),
82-
Number: github.Ptr(0),
83-
State: github.Ptr("dry-run"),
84+
return &gogithub.PullRequest{
85+
HTMLURL: "https://github.com/" + upstreamOwner + "/" + upstreamRepo + "/pull/0",
86+
Number: 0,
87+
State: "dry-run",
8488
}, nil
8589
}
8690
return pr.CreatePR(ctx, c.gh, upstreamOwner, upstreamRepo, forkOwner, branch, baseBranch, title, body)

0 commit comments

Comments
 (0)