Skip to content

Commit 4d5a1d1

Browse files
committed
baton-github: update error in validate() and upgrade baton-sdk
1 parent 02d8ad7 commit 4d5a1d1

File tree

23 files changed

+1191
-548
lines changed

23 files changed

+1191
-548
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
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
@@ -120,6 +120,7 @@ require (
120120
golang.org/x/net v0.35.0 // indirect
121121
golang.org/x/sync v0.13.0 // indirect
122122
golang.org/x/sys v0.30.0 // indirect
123+
golang.org/x/term v0.29.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: 2 additions & 2 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=

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)