Skip to content

Commit a2ad997

Browse files
authored
Merge pull request #101 from ConductorOne/Ben/updateValidateError
baton-github: update error in validate() and upgrade baton-sdk and term package.
2 parents 02d8ad7 + 3718e8f commit a2ad997

File tree

117 files changed

+6427
-634
lines changed

Some content is hidden

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

117 files changed

+6427
-634
lines changed

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/conductorone/baton-github
33
go 1.23.4
44

55
require (
6-
github.com/conductorone/baton-sdk v0.3.10
6+
github.com/conductorone/baton-sdk v0.3.30
77
github.com/deckarep/golang-set/v2 v2.8.0
88
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
99
github.com/golang-jwt/jwt/v5 v5.2.2
@@ -119,7 +119,8 @@ require (
119119
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
120120
golang.org/x/net v0.35.0 // indirect
121121
golang.org/x/sync v0.13.0 // indirect
122-
golang.org/x/sys v0.30.0 // indirect
122+
golang.org/x/sys v0.34.0 // indirect
123+
golang.org/x/term v0.33.0 // indirect
123124
golang.org/x/time v0.8.0 // indirect
124125
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
125126
google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
5858
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
5959
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
6060
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
61-
github.com/conductorone/baton-sdk v0.3.10 h1:e1J0Y2knHTbzn9bAsjElmhv5lRpYwI6ixw0Ak+gx0JY=
62-
github.com/conductorone/baton-sdk v0.3.10/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0=
61+
github.com/conductorone/baton-sdk v0.3.30 h1:KR6r1pMpssQW6EgcSMOvtmBpkd08KX1bGtvUUGSXqek=
62+
github.com/conductorone/baton-sdk v0.3.30/go.mod h1:L55WO3ERMx1mfpjDgwK3jWNRGRF2E76WrQHmW6ev8VY=
6363
github.com/conductorone/dpop v0.2.3 h1:s91U3845GHQ6P6FWrdNr2SEOy1ES/jcFs1JtKSl2S+o=
6464
github.com/conductorone/dpop v0.2.3/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s=
6565
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 h1:kLMCNIh0Mo2vbvvkCmJ3ixsPbXEJ6HPcW53Ku9yje3s=
@@ -358,10 +358,10 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w
358358
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
359359
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
360360
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
361-
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
362-
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
363-
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
364-
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
361+
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
362+
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
363+
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
364+
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
365365
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
366366
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
367367
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=

pkg/connector/connector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func (gh *GitHub) Validate(ctx context.Context) (annotations.Annotations, error)
180180
membership, _, err := gh.client.Organizations.GetOrgMembership(ctx, "", o)
181181
if err != nil {
182182
if filterOrgs {
183-
return nil, fmt.Errorf("access token must be an admin on the %s organization: %w", o, err)
183+
return nil, fmt.Errorf("can't get authenticated user on the %s organization: %w", o, err)
184184
}
185185
continue
186186
}
@@ -203,7 +203,7 @@ func (gh *GitHub) Validate(ctx context.Context) (annotations.Annotations, error)
203203
if len(gh.enterprises) > 0 {
204204
_, _, err := gh.customClient.ListEnterpriseConsumedLicenses(ctx, gh.enterprises[0], 0)
205205
if err != nil {
206-
return nil, fmt.Errorf("access token must be an admin on the enterprise to sync enterprise roles: %w", err)
206+
return nil, fmt.Errorf("can't list enterprise consumed licenses: %w", err)
207207
}
208208
}
209209
return nil, nil

vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go

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

vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go

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

0 commit comments

Comments
 (0)