Skip to content

Commit 99d3d92

Browse files
Merge pull request #10 from merchantmoh-debug/bolt-sentinel-client-improvement-10999790790030565127-15006340757148053698
Revert a89c0a6 from bolt branch
2 parents ea23ae6 + a25ab37 commit 99d3d92

24 files changed

Lines changed: 8612 additions & 424 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ vendor/
1919
# golangci-lint -v custom generates the following local file:
2020
custom-gcl
2121
custom-gcl.exe
22+
gen-iterators

example/go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ require (
99
github.com/gofri/go-github-ratelimit/v2 v2.0.2
1010
github.com/google/go-github/v81 v81.0.0
1111
github.com/sigstore/sigstore-go v0.6.1
12-
golang.org/x/crypto v0.47.0
13-
golang.org/x/term v0.39.0
12+
golang.org/x/crypto v0.46.0
13+
golang.org/x/term v0.38.0
1414
google.golang.org/appengine v1.6.8
1515
)
1616

@@ -87,11 +87,11 @@ require (
8787
go.uber.org/multierr v1.11.0 // indirect
8888
go.uber.org/zap v1.27.0 // indirect
8989
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
90-
golang.org/x/mod v0.31.0 // indirect
91-
golang.org/x/net v0.48.0 // indirect
90+
golang.org/x/mod v0.30.0 // indirect
91+
golang.org/x/net v0.47.0 // indirect
9292
golang.org/x/sync v0.19.0 // indirect
93-
golang.org/x/sys v0.40.0 // indirect
94-
golang.org/x/text v0.33.0 // indirect
93+
golang.org/x/sys v0.39.0 // indirect
94+
golang.org/x/text v0.32.0 // indirect
9595
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
9696
google.golang.org/protobuf v1.34.2 // indirect
9797
gopkg.in/ini.v1 v1.67.0 // indirect

example/go.sum

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -355,18 +355,18 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
355355
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
356356
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
357357
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
358-
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
359-
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
358+
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
359+
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
360360
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o=
361361
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
362362
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
363-
golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI=
364-
golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg=
363+
golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
364+
golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc=
365365
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
366366
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
367367
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
368-
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
369-
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
368+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
369+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
370370
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
371371
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
372372
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -378,18 +378,18 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
378378
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
379379
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
380380
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
381-
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
382-
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
381+
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
382+
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
383383
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
384384
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
385-
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
386-
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
385+
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
386+
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
387387
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
388388
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
389389
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
390390
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
391-
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
392-
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
391+
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
392+
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
393393
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
394394
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
395395
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

github/enterprise_properties_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func TestEnterpriseService_GetAllCustomProperties(t *testing.T) {
5555
PropertyName: Ptr("name"),
5656
ValueType: PropertyValueTypeSingleSelect,
5757
Required: Ptr(true),
58-
DefaultValue: "production",
58+
DefaultValue: Ptr("production"),
5959
Description: Ptr("Prod or dev environment"),
6060
AllowedValues: []string{"production", "development"},
6161
ValuesEditableBy: Ptr("org_actors"),
@@ -178,7 +178,7 @@ func TestEnterpriseService_GetCustomProperty(t *testing.T) {
178178
PropertyName: Ptr("name"),
179179
ValueType: PropertyValueTypeSingleSelect,
180180
Required: Ptr(true),
181-
DefaultValue: "production",
181+
DefaultValue: Ptr("production"),
182182
Description: Ptr("Prod or dev environment"),
183183
AllowedValues: []string{"production", "development"},
184184
ValuesEditableBy: Ptr("org_actors"),
@@ -222,7 +222,7 @@ func TestEnterpriseService_CreateOrUpdateCustomProperty(t *testing.T) {
222222
property, _, err := client.Enterprise.CreateOrUpdateCustomProperty(ctx, "e", "name", &CustomProperty{
223223
ValueType: PropertyValueTypeSingleSelect,
224224
Required: Ptr(true),
225-
DefaultValue: "production",
225+
DefaultValue: Ptr("production"),
226226
Description: Ptr("Prod or dev environment"),
227227
AllowedValues: []string{"production", "development"},
228228
ValuesEditableBy: Ptr("org_actors"),
@@ -235,7 +235,7 @@ func TestEnterpriseService_CreateOrUpdateCustomProperty(t *testing.T) {
235235
PropertyName: Ptr("name"),
236236
ValueType: PropertyValueTypeSingleSelect,
237237
Required: Ptr(true),
238-
DefaultValue: "production",
238+
DefaultValue: Ptr("production"),
239239
Description: Ptr("Prod or dev environment"),
240240
AllowedValues: []string{"production", "development"},
241241
ValuesEditableBy: Ptr("org_actors"),

github/event_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13732,7 +13732,7 @@ func TestCustomPropertyEvent_Marshal(t *testing.T) {
1373213732
ValueType: PropertyValueTypeSingleSelect,
1373313733
SourceType: Ptr("enterprise"),
1373413734
Required: Ptr(true),
13735-
DefaultValue: "production",
13735+
DefaultValue: Ptr("production"),
1373613736
Description: Ptr("Prod or dev environment"),
1373713737
AllowedValues: []string{"production", "development"},
1373813738
ValuesEditableBy: Ptr("org_actors"),

github/example_iterators_test.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2025 The go-github AUTHORS. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style
4+
// license that can be found in the LICENSE file.
5+
6+
package github_test
7+
8+
import (
9+
"context"
10+
"fmt"
11+
"log"
12+
13+
"github.com/google/go-github/v81/github"
14+
)
15+
16+
func ExampleRepositoriesService_ListByUserIter() {
17+
client := github.NewClient(nil)
18+
ctx := context.Background()
19+
20+
// List all repositories for a user using the iterator.
21+
// This automatically handles pagination.
22+
opts := &github.RepositoryListByUserOptions{Type: "public"}
23+
for repo, err := range client.Repositories.ListByUserIter(ctx, "octocat", opts) {
24+
if err != nil {
25+
log.Fatalf("Error listing repos: %v", err)
26+
}
27+
fmt.Println(repo.GetName())
28+
}
29+
}

0 commit comments

Comments
 (0)