From 865ef0bb7632c636827138e6c61a8c1c22c7bfd1 Mon Sep 17 00:00:00 2001 From: Billy Keyes Date: Mon, 26 Oct 2026 09:01:00 -0400 Subject: [PATCH] Update google/go-github to v93 --- applier.go | 4 ++-- applier_test.go | 4 ++-- cmd/patch2pr/main.go | 12 ++++++------ go.mod | 2 +- go.sum | 4 ++-- graphql_applier.go | 2 +- reference.go | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/applier.go b/applier.go index 45cb798..1accb15 100644 --- a/applier.go +++ b/applier.go @@ -13,7 +13,7 @@ import ( "time" "github.com/bluekeyes/go-gitdiff/gitdiff" - "github.com/google/go-github/v92/github" + "github.com/google/go-github/v93/github" ) // DefaultCommitMessage is the commit message used when no message is provided @@ -91,7 +91,7 @@ func (a *Applier) Apply(ctx context.Context, f *gitdiff.File) (*github.TreeEntry if entry.Content != nil { blob, _, err := a.client.Git.CreateBlob(ctx, a.owner, a.repo, github.Blob{ - Content: entry.Content, + Content: entry.GetContent(), Encoding: new("base64"), }) if err != nil { diff --git a/applier_test.go b/applier_test.go index 47746c1..432bab1 100644 --- a/applier_test.go +++ b/applier_test.go @@ -15,7 +15,7 @@ import ( "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/bluekeyes/patch2pr/internal" - "github.com/google/go-github/v92/github" + "github.com/google/go-github/v93/github" "github.com/shurcooL/githubv4" ) @@ -315,7 +315,7 @@ func createBranch(t *testing.T, tctx *TestContext) { c := base64.StdEncoding.EncodeToString(content) blob, _, err := tctx.Client.Git.CreateBlob(tctx, tctx.Repo.Owner, tctx.Repo.Name, github.Blob{ Encoding: new("base64"), - Content: &c, + Content: c, }) if err != nil { return err diff --git a/cmd/patch2pr/main.go b/cmd/patch2pr/main.go index 0a896a3..b9a20dd 100644 --- a/cmd/patch2pr/main.go +++ b/cmd/patch2pr/main.go @@ -14,7 +14,7 @@ import ( "time" "github.com/bluekeyes/go-gitdiff/gitdiff" - "github.com/google/go-github/v92/github" + "github.com/google/go-github/v93/github" "github.com/bluekeyes/patch2pr" "github.com/bluekeyes/patch2pr/internal" @@ -370,15 +370,15 @@ func createFork(ctx context.Context, client *github.Client, fork, parent patch2p maxWait = 5 * time.Minute ) - organization := fork.Owner + organization := &fork.Owner if isUserFork { - organization = "" + organization = nil } - repo, _, err := client.Repositories.CreateFork(ctx, parent.Owner, parent.Name, &github.RepositoryCreateForkOptions{ + repo, _, err := client.Repositories.CreateFork(ctx, parent.Owner, parent.Name, github.CreateForkRequest{ Organization: organization, - Name: fork.Name, - DefaultBranchOnly: true, + Name: new(fork.Name), + DefaultBranchOnly: new(true), }) var aerr *github.AcceptedError diff --git a/go.mod b/go.mod index c516059..917bf6e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.26.0 require ( github.com/bluekeyes/go-gitdiff v0.9.0 - github.com/google/go-github/v92 v92.0.0 + github.com/google/go-github/v93 v93.0.0 github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed ) diff --git a/go.sum b/go.sum index 76e71f7..0bafbc0 100644 --- a/go.sum +++ b/go.sum @@ -3,8 +3,8 @@ github.com/bluekeyes/go-gitdiff v0.9.0/go.mod h1:WWAk1Mc6EgWarCrPFO+xeYlujPu98Vu github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/v92 v92.0.0 h1:4vW4RVffwIvoEfIA4RX09mRSB47qQX557/2+HgeWRRg= -github.com/google/go-github/v92 v92.0.0/go.mod h1:w3CH62ZcmRfvW1cdXpyTztSOVMtdjxtKpgo0GouLmjY= +github.com/google/go-github/v93 v93.0.0 h1:qElXPLv+XbSz1qrLdWyb0t3gSYGsWBTzr9T4/PZTCfk= +github.com/google/go-github/v93 v93.0.0/go.mod h1:l8I3rt4/mdjANKpg4Y84LEy9HJQCetUkZ8WTl2bPU8M= 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/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed h1:KT7hI8vYXgU0s2qaMkrfq9tCA1w/iEPgfredVP+4Tzw= diff --git a/graphql_applier.go b/graphql_applier.go index 45bc8ac..7250bb7 100644 --- a/graphql_applier.go +++ b/graphql_applier.go @@ -10,7 +10,7 @@ import ( "path" "github.com/bluekeyes/go-gitdiff/gitdiff" - "github.com/google/go-github/v92/github" + "github.com/google/go-github/v93/github" "github.com/shurcooL/githubv4" ) diff --git a/reference.go b/reference.go index 4ed01c3..aafc1ea 100644 --- a/reference.go +++ b/reference.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/google/go-github/v92/github" + "github.com/google/go-github/v93/github" ) // Reference is a named reference in a repository.