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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/v74/github)
[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v75/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)
Expand Down Expand Up @@ -30,29 +30,29 @@ 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/v74
go get github.com/google/go-github/v75
```

will resolve and add the package to the current development module, along with its dependencies.

Alternatively the same can be achieved if you use import in a package:

```go
import "github.com/google/go-github/v74/github"
import "github.com/google/go-github/v75/github"
```

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/v74@master
go get github.com/google/go-github/v75@master
```

## Usage ##

```go
import "github.com/google/go-github/v74/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/google/go-github/v75/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/google/go-github/github" // with go modules disabled
```

Expand Down Expand Up @@ -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/v74/github#BasicAuthTransport).
[`BasicAuthTransport`](https://pkg.go.dev/github.com/google/go-github/v75/github#BasicAuthTransport).

#### As a GitHub App ####

Expand All @@ -125,7 +125,7 @@ import (
"net/http"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func main() {
Expand Down Expand Up @@ -159,7 +159,7 @@ import (
"os"
"strconv"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"github.com/jferrl/go-githubauth"
"golang.org/x/oauth2"
)
Expand Down Expand Up @@ -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/v74/github
[package docs]: https://pkg.go.dev/github.com/google/go-github/v75/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
Expand Down Expand Up @@ -474,7 +474,7 @@ Versions prior to 48.2.0 are not listed.

| go-github Version | GitHub v3 API Version |
| ----------------- | --------------------- |
| 74.0.0 | 2022-11-28 |
| 75.0.0 | 2022-11-28 |
| ... | 2022-11-28 |
| 48.2.0 | 2022-11-28 |

Expand Down
2 changes: 1 addition & 1 deletion example/actionpermissions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion example/appengine/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/http"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"google.golang.org/appengine"
"google.golang.org/appengine/log"
)
Expand Down
2 changes: 1 addition & 1 deletion example/basicauth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"strings"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"golang.org/x/term"
)

Expand Down
2 changes: 1 addition & 1 deletion example/codespaces/newreposecretwithxcrypto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"golang.org/x/crypto/nacl/box"
)

Expand Down
2 changes: 1 addition & 1 deletion example/codespaces/newusersecretwithxcrypto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"golang.org/x/crypto/nacl/box"
)

Expand Down
6 changes: 3 additions & 3 deletions example/commitpr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/v74/github#example-RepositoriesService-CreateFile
// https://pkg.go.dev/github.com/google/go-github/v75/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
Expand All @@ -33,7 +33,7 @@ import (
"time"

"github.com/ProtonMail/go-crypto/openpgp"
"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down Expand Up @@ -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/v74/github#example-PullRequestsService-Create
// createPR creates a pull request. Based on: https://pkg.go.dev/github.com/google/go-github/v75/github#example-PullRequestsService-Create
func createPR() (err error) {
if *prSubject == "" {
return errors.New("missing `-pr-title` flag; skipping PR creation")
Expand Down
6 changes: 3 additions & 3 deletions example/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/google/go-github/v74/example
module github.com/google/go-github/v75/example

go 1.24.0

Expand All @@ -7,7 +7,7 @@ require (
github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
github.com/gofri/go-github-pagination v1.0.0
github.com/gofri/go-github-ratelimit/v2 v2.0.2
github.com/google/go-github/v74 v74.0.0
github.com/google/go-github/v75 v75.0.0
github.com/sigstore/sigstore-go v0.6.1
golang.org/x/crypto v0.36.0
golang.org/x/term v0.30.0
Expand Down Expand Up @@ -100,4 +100,4 @@ require (
)

// Use version at HEAD, not the latest published.
replace github.com/google/go-github/v74 => ../
replace github.com/google/go-github/v75 => ../
2 changes: 1 addition & 1 deletion example/listenvironments/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/migrations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func fetchAllUserMigrations() ([]*github.UserMigration, error) {
Expand Down
2 changes: 1 addition & 1 deletion example/newfilewithappauth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"time"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/newrepo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions example/newreposecretwithlibsodium/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.24.0

require (
github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb
github.com/google/go-github/v74 v74.0.0
github.com/google/go-github/v75 v75.0.0
)

require github.com/google/go-querystring v1.1.0 // indirect

// Use version at HEAD, not the latest published.
replace github.com/google/go-github/v74 => ../..
replace github.com/google/go-github/v75 => ../..
2 changes: 1 addition & 1 deletion example/newreposecretwithlibsodium/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"os"

sodium "github.com/GoKillers/libsodium-go/cryptobox"
"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion example/newreposecretwithxcrypto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"golang.org/x/crypto/nacl/box"
)

Expand Down
2 changes: 1 addition & 1 deletion example/ratelimit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/v74/github"
"github.com/google/go-github/v75/github"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

// Fetch all the public organizations' membership of a user.
Expand Down
2 changes: 1 addition & 1 deletion example/tokenauth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"golang.org/x/term"
)

Expand Down
2 changes: 1 addition & 1 deletion example/topics/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"context"
"fmt"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

// Fetch and lists all the public topics associated with the specified GitHub topic.
Expand Down
2 changes: 1 addition & 1 deletion example/verifyartifact/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"log"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
"github.com/sigstore/sigstore-go/pkg/bundle"
"github.com/sigstore/sigstore-go/pkg/root"
"github.com/sigstore/sigstore-go/pkg/verify"
Expand Down
2 changes: 1 addition & 1 deletion github/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API.

Usage:

import "github.com/google/go-github/v74/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/google/go-github/v75/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
Expand Down
2 changes: 1 addition & 1 deletion github/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"fmt"
"log"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func ExampleMarkdownService_Render() {
Expand Down
2 changes: 1 addition & 1 deletion github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

const (
Version = "v74.0.0"
Version = "v75.0.0"

defaultAPIVersion = "2022-11-28"
defaultBaseURL = "https://api.github.com/"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/google/go-github/v74
module github.com/google/go-github/v75

go 1.24.0

Expand Down
2 changes: 1 addition & 1 deletion test/fields/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"reflect"
"strings"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion test/integration/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"context"
"testing"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion test/integration/authorizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion test/integration/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"net/http"
"os"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion test/integration/repos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func TestRepositories_CRUD(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"math/rand"
"testing"

"github.com/google/go-github/v74/github"
"github.com/google/go-github/v75/github"
)

func TestUsers_Get(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/alecthomas/kong v1.12.1
github.com/getkin/kin-openapi v0.133.0
github.com/google/go-cmp v0.7.0
github.com/google/go-github/v74 v74.0.0
github.com/google/go-github/v75 v75.0.0
golang.org/x/sync v0.17.0
gopkg.in/yaml.v3 v3.0.1
)
Expand All @@ -26,4 +26,4 @@ require (
)

// Use version at HEAD, not the latest published.
replace github.com/google/go-github/v74 => ../
replace github.com/google/go-github/v75 => ../
Loading
Loading