Skip to content

Commit b04e0e6

Browse files
authored
Merge branch 'master' into improve-testJSONMarshal
2 parents b8d0a20 + 8f3c64e commit b04e0e6

File tree

45 files changed

+128
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+128
-102
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# go-github #
22

33
[![go-github release (latest SemVer)](https://img.shields.io/github/v/release/google/go-github?sort=semver)](https://github.com/google/go-github/releases)
4-
[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v69/github)
4+
[![Go Reference](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/google/go-github/v70/github)
55
[![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)
66
[![Test Coverage](https://codecov.io/gh/google/go-github/branch/master/graph/badge.svg)](https://codecov.io/gh/google/go-github)
77
[![Discuss at [email protected]](https://img.shields.io/badge/discuss-go--github%40googlegroups.com-blue.svg)](https://groups.google.com/group/go-github)
@@ -30,29 +30,29 @@ If you're interested in using the [GraphQL API v4][], the recommended library is
3030
go-github is compatible with modern Go releases in module mode, with Go installed:
3131

3232
```bash
33-
go get github.com/google/go-github/v69
33+
go get github.com/google/go-github/v70
3434
```
3535

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

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

4040
```go
41-
import "github.com/google/go-github/v69/github"
41+
import "github.com/google/go-github/v70/github"
4242
```
4343

4444
and run `go get` without parameters.
4545

4646
Finally, to use the top-of-trunk version of this repo, use the following command:
4747

4848
```bash
49-
go get github.com/google/go-github/v69@master
49+
go get github.com/google/go-github/v70@master
5050
```
5151

5252
## Usage ##
5353

5454
```go
55-
import "github.com/google/go-github/v69/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
55+
import "github.com/google/go-github/v70/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
5656
import "github.com/google/go-github/github" // with go modules disabled
5757
```
5858

@@ -125,7 +125,7 @@ import (
125125
"net/http"
126126

127127
"github.com/bradleyfalzon/ghinstallation/v2"
128-
"github.com/google/go-github/v69/github"
128+
"github.com/google/go-github/v70/github"
129129
)
130130

131131
func main() {
@@ -159,7 +159,7 @@ import (
159159
"os"
160160
"strconv"
161161

162-
"github.com/google/go-github/v69/github"
162+
"github.com/google/go-github/v70/github"
163163
"github.com/jferrl/go-githubauth"
164164
"golang.org/x/oauth2"
165165
)
@@ -380,7 +380,7 @@ For complete usage of go-github, see the full [package docs][].
380380

381381
[GitHub API v3]: https://docs.github.com/en/rest
382382
[personal access token]: https://github.com/blog/1509-personal-api-tokens
383-
[package docs]: https://pkg.go.dev/github.com/google/go-github/v69/github
383+
[package docs]: https://pkg.go.dev/github.com/google/go-github/v70/github
384384
[GraphQL API v4]: https://developer.github.com/v4/
385385
[shurcooL/githubv4]: https://github.com/shurcooL/githubv4
386386
[GitHub webhook events]: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads
@@ -454,7 +454,7 @@ Versions prior to 48.2.0 are not listed.
454454

455455
| go-github Version | GitHub v3 API Version |
456456
| ----------------- | --------------------- |
457-
| 69.x.0 | 2022-11-28 |
457+
| 70.0.0 | 2022-11-28 |
458458
| ... | 2022-11-28 |
459459
| 48.2.0 | 2022-11-28 |
460460

example/actionpermissions/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"log"
1515
"os"
1616

17-
"github.com/google/go-github/v69/github"
17+
"github.com/google/go-github/v70/github"
1818
)
1919

2020
var (

example/appengine/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"net/http"
1313
"os"
1414

15-
"github.com/google/go-github/v69/github"
15+
"github.com/google/go-github/v70/github"
1616
"google.golang.org/appengine"
1717
"google.golang.org/appengine/log"
1818
)

example/basicauth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os"
2222
"strings"
2323

24-
"github.com/google/go-github/v69/github"
24+
"github.com/google/go-github/v70/github"
2525
"golang.org/x/term"
2626
)
2727

example/codespaces/newreposecretwithxcrypto/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"log"
3838
"os"
3939

40-
"github.com/google/go-github/v69/github"
40+
"github.com/google/go-github/v70/github"
4141
"golang.org/x/crypto/nacl/box"
4242
)
4343

example/codespaces/newusersecretwithxcrypto/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"log"
3939
"os"
4040

41-
"github.com/google/go-github/v69/github"
41+
"github.com/google/go-github/v70/github"
4242
"golang.org/x/crypto/nacl/box"
4343
)
4444

example/commitpr/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"time"
3434

3535
"github.com/ProtonMail/go-crypto/openpgp"
36-
"github.com/google/go-github/v69/github"
36+
"github.com/google/go-github/v70/github"
3737
)
3838

3939
var (

example/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/google/go-github/v69/example
1+
module github.com/google/go-github/v70/example
22

33
go 1.23.0
44

@@ -7,7 +7,7 @@ require (
77
github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
88
github.com/gofri/go-github-pagination v1.0.0
99
github.com/gofri/go-github-ratelimit/v2 v2.0.2
10-
github.com/google/go-github/v69 v69.2.0
10+
github.com/google/go-github/v70 v70.0.0
1111
github.com/sigstore/sigstore-go v0.6.1
1212
golang.org/x/crypto v0.35.0
1313
golang.org/x/term v0.29.0
@@ -100,4 +100,4 @@ require (
100100
)
101101

102102
// Use version at HEAD, not the latest published.
103-
replace github.com/google/go-github/v69 => ../
103+
replace github.com/google/go-github/v70 => ../

example/listenvironments/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"log"
1919
"os"
2020

21-
"github.com/google/go-github/v69/github"
21+
"github.com/google/go-github/v70/github"
2222
)
2323

2424
func main() {

example/migrations/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"context"
1313
"fmt"
1414

15-
"github.com/google/go-github/v69/github"
15+
"github.com/google/go-github/v70/github"
1616
)
1717

1818
func fetchAllUserMigrations() ([]*github.UserMigration, error) {

example/newfilewithappauth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"time"
1717

1818
"github.com/bradleyfalzon/ghinstallation/v2"
19-
"github.com/google/go-github/v69/github"
19+
"github.com/google/go-github/v70/github"
2020
)
2121

2222
func main() {

example/newrepo/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"log"
1717
"os"
1818

19-
"github.com/google/go-github/v69/github"
19+
"github.com/google/go-github/v70/github"
2020
)
2121

2222
var (

example/newreposecretwithlibsodium/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ go 1.23.0
44

55
require (
66
github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb
7-
github.com/google/go-github/v69 v69.2.0
7+
github.com/google/go-github/v70 v70.0.0
88
)
99

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

1212
// Use version at HEAD, not the latest published.
13-
replace github.com/google/go-github/v69 => ../..
13+
replace github.com/google/go-github/v70 => ../..

example/newreposecretwithlibsodium/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"os"
3737

3838
sodium "github.com/GoKillers/libsodium-go/cryptobox"
39-
"github.com/google/go-github/v69/github"
39+
"github.com/google/go-github/v70/github"
4040
)
4141

4242
var (

example/newreposecretwithxcrypto/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"log"
3838
"os"
3939

40-
"github.com/google/go-github/v69/github"
40+
"github.com/google/go-github/v70/github"
4141
"golang.org/x/crypto/nacl/box"
4242
)
4343

example/ratelimit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/gofri/go-github-ratelimit/v2/github_ratelimit"
1818
"github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_primary_ratelimit"
1919
"github.com/gofri/go-github-ratelimit/v2/github_ratelimit/github_secondary_ratelimit"
20-
"github.com/google/go-github/v69/github"
20+
"github.com/google/go-github/v70/github"
2121
)
2222

2323
func main() {

example/simple/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"context"
1313
"fmt"
1414

15-
"github.com/google/go-github/v69/github"
15+
"github.com/google/go-github/v70/github"
1616
)
1717

1818
// Fetch all the public organizations' membership of a user.

example/tokenauth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"log"
1616
"os"
1717

18-
"github.com/google/go-github/v69/github"
18+
"github.com/google/go-github/v70/github"
1919
"golang.org/x/term"
2020
)
2121

example/topics/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"context"
1313
"fmt"
1414

15-
"github.com/google/go-github/v69/github"
15+
"github.com/google/go-github/v70/github"
1616
)
1717

1818
// Fetch and lists all the public topics associated with the specified GitHub topic.

example/verifyartifact/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"log"
1919
"os"
2020

21-
"github.com/google/go-github/v69/github"
21+
"github.com/google/go-github/v70/github"
2222
"github.com/sigstore/sigstore-go/pkg/bundle"
2323
"github.com/sigstore/sigstore-go/pkg/root"
2424
"github.com/sigstore/sigstore-go/pkg/verify"

github/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API.
88
99
Usage:
1010
11-
import "github.com/google/go-github/v69/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
11+
import "github.com/google/go-github/v70/github" // with go modules enabled (GO111MODULE=on or outside GOPATH)
1212
import "github.com/google/go-github/github" // with go modules disabled
1313
1414
Construct a new GitHub client, then use the various services on the client to

github/event_types_test.go

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9638,11 +9638,12 @@ func TestRepositoryRulesetEvent_Unmarshal(t *testing.T) {
96389638
MergeMethodRebase,
96399639
MergeMethodMerge,
96409640
},
9641-
DismissStaleReviewsOnPush: false,
9642-
RequireCodeOwnerReview: false,
9643-
RequireLastPushApproval: false,
9644-
RequiredApprovingReviewCount: 2,
9645-
RequiredReviewThreadResolution: false,
9641+
AutomaticCopilotCodeReviewEnabled: Ptr(false),
9642+
DismissStaleReviewsOnPush: false,
9643+
RequireCodeOwnerReview: false,
9644+
RequireLastPushApproval: false,
9645+
RequiredApprovingReviewCount: 2,
9646+
RequiredReviewThreadResolution: false,
96469647
},
96479648
CodeScanning: &CodeScanningRuleParameters{
96489649
CodeScanningTools: []*RuleCodeScanningTool{
@@ -9700,11 +9701,12 @@ func TestRepositoryRulesetEvent_Unmarshal(t *testing.T) {
97009701
MergeMethodSquash,
97019702
MergeMethodRebase,
97029703
},
9703-
DismissStaleReviewsOnPush: false,
9704-
RequireCodeOwnerReview: false,
9705-
RequireLastPushApproval: false,
9706-
RequiredApprovingReviewCount: 2,
9707-
RequiredReviewThreadResolution: false,
9704+
AutomaticCopilotCodeReviewEnabled: Ptr(false),
9705+
DismissStaleReviewsOnPush: false,
9706+
RequireCodeOwnerReview: false,
9707+
RequireLastPushApproval: false,
9708+
RequiredApprovingReviewCount: 2,
9709+
RequiredReviewThreadResolution: false,
97089710
},
97099711
CodeScanning: &CodeScanningRuleParameters{
97109712
CodeScanningTools: []*RuleCodeScanningTool{
@@ -9754,11 +9756,12 @@ func TestRepositoryRulesetEvent_Unmarshal(t *testing.T) {
97549756
MergeMethodSquash,
97559757
MergeMethodRebase,
97569758
},
9757-
DismissStaleReviewsOnPush: false,
9758-
RequireCodeOwnerReview: false,
9759-
RequireLastPushApproval: false,
9760-
RequiredApprovingReviewCount: 2,
9761-
RequiredReviewThreadResolution: false,
9759+
AutomaticCopilotCodeReviewEnabled: Ptr(false),
9760+
DismissStaleReviewsOnPush: false,
9761+
RequireCodeOwnerReview: false,
9762+
RequireLastPushApproval: false,
9763+
RequiredApprovingReviewCount: 2,
9764+
RequiredReviewThreadResolution: false,
97629765
},
97639766
},
97649767
Changes: &RepositoryRulesetChangedRule{

github/examples_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"fmt"
1313
"log"
1414

15-
"github.com/google/go-github/v69/github"
15+
"github.com/google/go-github/v70/github"
1616
)
1717

1818
func ExampleMarkdownService_Render() {

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
const (
32-
Version = "v69.2.0"
32+
Version = "v70.0.0"
3333

3434
defaultAPIVersion = "2022-11-28"
3535
defaultBaseURL = "https://api.github.com/"

github/rules.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,13 @@ type RequiredDeploymentsRuleParameters struct {
395395

396396
// PullRequestRuleParameters represents the pull_request rule parameters.
397397
type PullRequestRuleParameters struct {
398-
AllowedMergeMethods []MergeMethod `json:"allowed_merge_methods"`
399-
DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"`
400-
RequireCodeOwnerReview bool `json:"require_code_owner_review"`
401-
RequireLastPushApproval bool `json:"require_last_push_approval"`
402-
RequiredApprovingReviewCount int `json:"required_approving_review_count"`
403-
RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"`
398+
AllowedMergeMethods []MergeMethod `json:"allowed_merge_methods"`
399+
AutomaticCopilotCodeReviewEnabled *bool `json:"automatic_copilot_code_review_enabled,omitempty"`
400+
DismissStaleReviewsOnPush bool `json:"dismiss_stale_reviews_on_push"`
401+
RequireCodeOwnerReview bool `json:"require_code_owner_review"`
402+
RequireLastPushApproval bool `json:"require_last_push_approval"`
403+
RequiredApprovingReviewCount int `json:"required_approving_review_count"`
404+
RequiredReviewThreadResolution bool `json:"required_review_thread_resolution"`
404405
}
405406

406407
// RequiredStatusChecksRuleParameters represents the required status checks rule parameters.

0 commit comments

Comments
 (0)