diff --git a/.custom-gcl.yml b/.custom-gcl.yml index 892195bf187..b1b1be73d27 100644 --- a/.custom-gcl.yml +++ b/.custom-gcl.yml @@ -1,8 +1,8 @@ version: v2.7.0 plugins: - - module: "github.com/google/go-github/v81/tools/fmtpercentv" + - module: "github.com/google/go-github/v82/tools/fmtpercentv" path: ./tools/fmtpercentv - - module: "github.com/google/go-github/v81/tools/sliceofpointers" + - module: "github.com/google/go-github/v82/tools/sliceofpointers" path: ./tools/sliceofpointers - - module: "github.com/google/go-github/v81/tools/structfield" + - module: "github.com/google/go-github/v82/tools/structfield" path: ./tools/structfield diff --git a/.golangci.yml b/.golangci.yml index 6906eda2e68..d1926205b46 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -157,15 +157,15 @@ linters: fmtpercentv: type: module description: Reports usage of %d or %s in format strings. - original-url: github.com/google/go-github/v81/tools/fmtpercentv + original-url: github.com/google/go-github/v82/tools/fmtpercentv sliceofpointers: type: module description: Reports usage of []*string and slices of structs without pointers. - original-url: github.com/google/go-github/v81/tools/sliceofpointers + original-url: github.com/google/go-github/v82/tools/sliceofpointers structfield: type: module description: Reports mismatches between Go field and JSON, URL tag names and types. - original-url: github.com/google/go-github/v81/tools/structfield + original-url: github.com/google/go-github/v82/tools/structfield settings: allowed-tag-names: - ActionsCacheUsageList.RepoCacheUsage # TODO: RepoCacheUsages ? diff --git a/README.md b/README.md index ee3a2e195cc..dca833aec72 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # go-github # [![go-github release (latest SemVer)](https://img.shields.io/github/v/release/google/go-github?sort=semver)](https://github.com/google/go-github/releases) -[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v81/github) +[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v82/github) [![Test Status](https://github.com/google/go-github/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/google/go-github/actions/workflows/tests.yml) [![Test Coverage](https://codecov.io/gh/google/go-github/branch/master/graph/badge.svg)](https://codecov.io/gh/google/go-github) [![Discuss at go-github@googlegroups.com](https://img.shields.io/badge/discuss-go--github%40googlegroups.com-blue.svg)](https://groups.google.com/group/go-github) @@ -30,7 +30,7 @@ If you're interested in using the [GraphQL API v4][], the recommended library is go-github is compatible with modern Go releases in module mode, with Go installed: ```bash -go get github.com/google/go-github/v81 +go get github.com/google/go-github/v82 ``` will resolve and add the package to the current development module, along with its dependencies. @@ -38,7 +38,7 @@ will resolve and add the package to the current development module, along with i Alternatively the same can be achieved if you use import in a package: ```go -import "github.com/google/go-github/v81/github" +import "github.com/google/go-github/v82/github" ``` and run `go get` without parameters. @@ -46,13 +46,13 @@ and run `go get` without parameters. Finally, to use the top-of-trunk version of this repo, use the following command: ```bash -go get github.com/google/go-github/v81@master +go get github.com/google/go-github/v82@master ``` ## Usage ## ```go -import "github.com/google/go-github/v81/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) +import "github.com/google/go-github/v82/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) import "github.com/google/go-github/github" // with go modules disabled ``` @@ -102,7 +102,7 @@ include the specified OAuth token. Therefore, authenticated clients should almost never be shared between different users. For API methods that require HTTP Basic Authentication, use the -[`BasicAuthTransport`](https://pkg.go.dev/github.com/google/go-github/v81/github#BasicAuthTransport). +[`BasicAuthTransport`](https://pkg.go.dev/github.com/google/go-github/v82/github#BasicAuthTransport). #### As a GitHub App #### @@ -125,7 +125,7 @@ import ( "net/http" "github.com/bradleyfalzon/ghinstallation/v2" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func main() { @@ -159,7 +159,7 @@ import ( "os" "strconv" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/jferrl/go-githubauth" "golang.org/x/oauth2" ) @@ -400,7 +400,7 @@ For complete usage of go-github, see the full [package docs][]. [GitHub API v3]: https://docs.github.com/en/rest [personal access token]: https://github.com/blog/1509-personal-api-tokens -[package docs]: https://pkg.go.dev/github.com/google/go-github/v81/github +[package docs]: https://pkg.go.dev/github.com/google/go-github/v82/github [GraphQL API v4]: https://developer.github.com/v4/ [shurcooL/githubv4]: https://github.com/shurcooL/githubv4 [GitHub webhook events]: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads @@ -474,7 +474,7 @@ Versions prior to 48.2.0 are not listed. | go-github Version | GitHub v3 API Version | | ----------------- | --------------------- | -| 81.0.0 | 2022-11-28 | +| 82.0.0 | 2022-11-28 | | ... | 2022-11-28 | | 48.2.0 | 2022-11-28 | diff --git a/example/actionpermissions/main.go b/example/actionpermissions/main.go index e554b34d8a4..8fcbee2d886 100644 --- a/example/actionpermissions/main.go +++ b/example/actionpermissions/main.go @@ -14,7 +14,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var ( diff --git a/example/appengine/app.go b/example/appengine/app.go index 0a78cfb9a3f..f6cca89253a 100644 --- a/example/appengine/app.go +++ b/example/appengine/app.go @@ -12,7 +12,7 @@ import ( "net/http" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "google.golang.org/appengine" "google.golang.org/appengine/log" ) diff --git a/example/basicauth/main.go b/example/basicauth/main.go index 5a881d373e1..926bdf25ec9 100644 --- a/example/basicauth/main.go +++ b/example/basicauth/main.go @@ -22,7 +22,7 @@ import ( "os" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/term" ) diff --git a/example/codespaces/newreposecretwithxcrypto/main.go b/example/codespaces/newreposecretwithxcrypto/main.go index bdeeea77e47..64d5e8bcfc8 100644 --- a/example/codespaces/newreposecretwithxcrypto/main.go +++ b/example/codespaces/newreposecretwithxcrypto/main.go @@ -37,7 +37,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/codespaces/newusersecretwithxcrypto/main.go b/example/codespaces/newusersecretwithxcrypto/main.go index ebbec4a12ea..8b731ae0b50 100644 --- a/example/codespaces/newusersecretwithxcrypto/main.go +++ b/example/codespaces/newusersecretwithxcrypto/main.go @@ -38,7 +38,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/commitpr/main.go b/example/commitpr/main.go index a5f838aa38f..c3b15c38e5a 100644 --- a/example/commitpr/main.go +++ b/example/commitpr/main.go @@ -13,7 +13,7 @@ // // Note, if you want to push a single file, you probably prefer to use the // content API. An example is available here: -// https://pkg.go.dev/github.com/google/go-github/v81/github#example-RepositoriesService-CreateFile +// https://pkg.go.dev/github.com/google/go-github/v82/github#example-RepositoriesService-CreateFile // // Note, for this to work at least 1 commit is needed, so you if you use this // after creating a repository you might want to make sure you set `AutoInit` to @@ -33,7 +33,7 @@ import ( "time" "github.com/ProtonMail/go-crypto/openpgp" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var ( @@ -178,7 +178,7 @@ func pushCommit(ref *github.Reference, tree *github.Tree) (err error) { return err } -// createPR creates a pull request. Based on: https://pkg.go.dev/github.com/google/go-github/v81/github#example-PullRequestsService-Create +// createPR creates a pull request. Based on: https://pkg.go.dev/github.com/google/go-github/v82/github#example-PullRequestsService-Create func createPR() (err error) { if *prSubject == "" { return errors.New("missing `-pr-title` flag; skipping PR creation") diff --git a/example/go.mod b/example/go.mod index b6b1664f17d..97e3ea915c6 100644 --- a/example/go.mod +++ b/example/go.mod @@ -1,4 +1,4 @@ -module github.com/google/go-github/v81/example +module github.com/google/go-github/v82/example go 1.24.0 @@ -7,7 +7,7 @@ require ( github.com/bradleyfalzon/ghinstallation/v2 v2.17.0 github.com/gofri/go-github-pagination v1.0.1 github.com/gofri/go-github-ratelimit/v2 v2.0.2 - github.com/google/go-github/v81 v81.0.0 + github.com/google/go-github/v82 v82.0.0 github.com/sigstore/sigstore-go v0.6.1 golang.org/x/crypto v0.47.0 golang.org/x/term v0.39.0 @@ -100,4 +100,4 @@ require ( ) // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v81 => ../ +replace github.com/google/go-github/v82 => ../ diff --git a/example/listenvironments/main.go b/example/listenvironments/main.go index ce5965d3f7d..d1f808ae588 100644 --- a/example/listenvironments/main.go +++ b/example/listenvironments/main.go @@ -18,7 +18,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func main() { diff --git a/example/migrations/main.go b/example/migrations/main.go index 9ad1bb3a307..6a8348225d8 100644 --- a/example/migrations/main.go +++ b/example/migrations/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func fetchAllUserMigrations() ([]*github.UserMigration, error) { diff --git a/example/newfilewithappauth/main.go b/example/newfilewithappauth/main.go index 9159c98d13d..b66ef94545d 100644 --- a/example/newfilewithappauth/main.go +++ b/example/newfilewithappauth/main.go @@ -16,7 +16,7 @@ import ( "time" "github.com/bradleyfalzon/ghinstallation/v2" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func main() { diff --git a/example/newrepo/main.go b/example/newrepo/main.go index 6f98ebd3a3b..6affc20f142 100644 --- a/example/newrepo/main.go +++ b/example/newrepo/main.go @@ -16,7 +16,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var ( diff --git a/example/newreposecretwithlibsodium/go.mod b/example/newreposecretwithlibsodium/go.mod index df237c933b1..82523faa2e2 100644 --- a/example/newreposecretwithlibsodium/go.mod +++ b/example/newreposecretwithlibsodium/go.mod @@ -4,10 +4,10 @@ go 1.24.0 require ( github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb - github.com/google/go-github/v81 v81.0.0 + github.com/google/go-github/v82 v82.0.0 ) require github.com/google/go-querystring v1.2.0 // indirect // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v81 => ../.. +replace github.com/google/go-github/v82 => ../.. diff --git a/example/newreposecretwithlibsodium/main.go b/example/newreposecretwithlibsodium/main.go index 46107d63d10..623578cdf5d 100644 --- a/example/newreposecretwithlibsodium/main.go +++ b/example/newreposecretwithlibsodium/main.go @@ -36,7 +36,7 @@ import ( "os" sodium "github.com/GoKillers/libsodium-go/cryptobox" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var ( diff --git a/example/newreposecretwithxcrypto/main.go b/example/newreposecretwithxcrypto/main.go index edfe9569d5a..3ba048aac9b 100644 --- a/example/newreposecretwithxcrypto/main.go +++ b/example/newreposecretwithxcrypto/main.go @@ -37,7 +37,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/crypto/nacl/box" ) diff --git a/example/ratelimit/main.go b/example/ratelimit/main.go index eda71ba40d0..7e1c101d975 100644 --- a/example/ratelimit/main.go +++ b/example/ratelimit/main.go @@ -17,7 +17,7 @@ import ( "github.com/gofri/go-github-ratelimit/v2/github_ratelimit" "github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_primary_ratelimit" "github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_secondary_ratelimit" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func main() { diff --git a/example/simple/main.go b/example/simple/main.go index ee4960d1c57..023d53a13a0 100644 --- a/example/simple/main.go +++ b/example/simple/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) // Fetch all the public organizations' membership of a user. diff --git a/example/tokenauth/main.go b/example/tokenauth/main.go index 5e9e1321edc..ceb0f87c313 100644 --- a/example/tokenauth/main.go +++ b/example/tokenauth/main.go @@ -15,7 +15,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/term" ) diff --git a/example/topics/main.go b/example/topics/main.go index aa7e548d32a..af0800de6c8 100644 --- a/example/topics/main.go +++ b/example/topics/main.go @@ -12,7 +12,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) // Fetch and lists all the public topics associated with the specified GitHub topic. diff --git a/example/uploadreleaseassetfromrelease/main.go b/example/uploadreleaseassetfromrelease/main.go index 1301a9a7ea9..dabfa405321 100644 --- a/example/uploadreleaseassetfromrelease/main.go +++ b/example/uploadreleaseassetfromrelease/main.go @@ -14,7 +14,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func main() { diff --git a/example/verifyartifact/main.go b/example/verifyartifact/main.go index e67743fbb17..027fe82e033 100644 --- a/example/verifyartifact/main.go +++ b/example/verifyartifact/main.go @@ -18,7 +18,7 @@ import ( "log" "os" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "github.com/sigstore/sigstore-go/pkg/bundle" "github.com/sigstore/sigstore-go/pkg/root" "github.com/sigstore/sigstore-go/pkg/verify" diff --git a/github/doc.go b/github/doc.go index 9cfe0ac91af..850f3ddbaa4 100644 --- a/github/doc.go +++ b/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v81/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v82/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) import "github.com/google/go-github/github" // with go modules disabled Construct a new GitHub client, then use the various services on the client to diff --git a/github/examples_test.go b/github/examples_test.go index b7a43797cf5..d65e4259b7d 100644 --- a/github/examples_test.go +++ b/github/examples_test.go @@ -12,7 +12,7 @@ import ( "fmt" "log" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func ExampleMarkdownService_Render() { diff --git a/github/github.go b/github/github.go index 9ab1fb11d7a..a806e7b8030 100644 --- a/github/github.go +++ b/github/github.go @@ -29,7 +29,7 @@ import ( ) const ( - Version = "v81.0.0" + Version = "v82.0.0" defaultAPIVersion = "2022-11-28" defaultBaseURL = "https://api.github.com/" diff --git a/go.mod b/go.mod index 5a3dfb5b90e..cf7f9f7298e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/google/go-github/v81 +module github.com/google/go-github/v82 go 1.24.0 diff --git a/test/fields/fields.go b/test/fields/fields.go index 653a87df4d2..5e0773a7485 100644 --- a/test/fields/fields.go +++ b/test/fields/fields.go @@ -25,7 +25,7 @@ import ( "reflect" "strings" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var ( diff --git a/test/integration/activity_test.go b/test/integration/activity_test.go index 0e3bb84d855..1a8a97ad6ae 100644 --- a/test/integration/activity_test.go +++ b/test/integration/activity_test.go @@ -10,7 +10,7 @@ package integration import ( "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) const ( diff --git a/test/integration/authorizations_test.go b/test/integration/authorizations_test.go index 59ae82584c6..7b69970ff10 100644 --- a/test/integration/authorizations_test.go +++ b/test/integration/authorizations_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) const ( diff --git a/test/integration/github_test.go b/test/integration/github_test.go index c56fa7c1229..d1e5992f226 100644 --- a/test/integration/github_test.go +++ b/test/integration/github_test.go @@ -15,7 +15,7 @@ import ( "sync" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) // client is a github.Client with the default http.Client. It is authorized if auth is true. diff --git a/test/integration/projects_test.go b/test/integration/projects_test.go index 6f88f3ea7ea..fc1986fac03 100644 --- a/test/integration/projects_test.go +++ b/test/integration/projects_test.go @@ -11,7 +11,7 @@ import ( "os" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) // Integration tests for Projects V2 endpoints defined in github/projects.go. diff --git a/test/integration/repos_test.go b/test/integration/repos_test.go index cf83c89a891..84264bcac2f 100644 --- a/test/integration/repos_test.go +++ b/test/integration/repos_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func TestRepositories_CRUD(t *testing.T) { diff --git a/test/integration/users_test.go b/test/integration/users_test.go index ea264785077..38dbcabfd56 100644 --- a/test/integration/users_test.go +++ b/test/integration/users_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func TestUsers_Get(t *testing.T) { diff --git a/tools/gen-release-notes/main.go b/tools/gen-release-notes/main.go index d02746eb739..0c1818d7fd9 100644 --- a/tools/gen-release-notes/main.go +++ b/tools/gen-release-notes/main.go @@ -5,7 +5,7 @@ // gen-release-notes first reads the web page https://github.com/google/go-github // to determine what the prior release was, (e.g. "v76.0.0") -// then reads https://github.com/google/go-github/compare/${PRIOR_RELEASE}...master +// then reads https://github.com/google/go-github/compare/commit-list?range=${PRIOR_RELEASE}...master // to find out what changes were made since then. // // Finally, it writes the release notes to stdout, summarizing the @@ -43,6 +43,7 @@ func main() { flag.Parse() priorRelease := getPriorRelease() + log.Printf("Prior release: %v", priorRelease) newChanges := newChangesSinceRelease(priorRelease) @@ -206,7 +207,7 @@ func genRefLines(breaking, nonBreaking []string) (ref, refNon []string) { } func newChangesSinceRelease(priorRelease string) string { - url := fmt.Sprintf("%v/compare/%v...master", baseWebURL, priorRelease) + url := fmt.Sprintf("%v/compare/commit-list?range=%v...master", baseWebURL, priorRelease) resp, err := http.Get(url) //nolint:gosec must(err) defer resp.Body.Close() diff --git a/tools/go.mod b/tools/go.mod index 7ccf6372416..0eb5509f0d8 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v1.13.0 github.com/getkin/kin-openapi v0.133.0 github.com/google/go-cmp v0.7.0 - github.com/google/go-github/v81 v81.0.0 + github.com/google/go-github/v82 v82.0.0 golang.org/x/sync v0.19.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -26,4 +26,4 @@ require ( ) // Use version at HEAD, not the latest published. -replace github.com/google/go-github/v81 => ../ +replace github.com/google/go-github/v82 => ../ diff --git a/tools/metadata/main.go b/tools/metadata/main.go index e13b17ab83f..38834612d8b 100644 --- a/tools/metadata/main.go +++ b/tools/metadata/main.go @@ -16,7 +16,7 @@ import ( "path/filepath" "github.com/alecthomas/kong" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) var helpVars = kong.Vars{ diff --git a/tools/metadata/main_test.go b/tools/metadata/main_test.go index 42927921206..ea64e6b289a 100644 --- a/tools/metadata/main_test.go +++ b/tools/metadata/main_test.go @@ -23,7 +23,7 @@ import ( "github.com/alecthomas/kong" "github.com/getkin/kin-openapi/openapi3" "github.com/google/go-cmp/cmp" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" ) func TestUpdateGo(t *testing.T) { diff --git a/tools/metadata/metadata.go b/tools/metadata/metadata.go index 5b28085d54f..af4b8ed05ce 100644 --- a/tools/metadata/metadata.go +++ b/tools/metadata/metadata.go @@ -24,7 +24,7 @@ import ( "strings" "sync" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "gopkg.in/yaml.v3" ) diff --git a/tools/metadata/openapi.go b/tools/metadata/openapi.go index 299bf3a5cd3..2986653837d 100644 --- a/tools/metadata/openapi.go +++ b/tools/metadata/openapi.go @@ -14,7 +14,7 @@ import ( "strconv" "github.com/getkin/kin-openapi/openapi3" - "github.com/google/go-github/v81/github" + "github.com/google/go-github/v82/github" "golang.org/x/sync/errgroup" )