Skip to content

Commit a5b7d7f

Browse files
author
MB Burch
authored
Merge pull request #77 from ConductorOne/mbburch/update-sdk-v0_3_10
Update baton-sdk to v0.3.10 and remove sorting from output_config
2 parents 111c41f + 2a207b7 commit a5b7d7f

File tree

25 files changed

+1354
-253
lines changed

25 files changed

+1354
-253
lines changed

.github/workflows/output_config.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
run: go build -o connector ./cmd/baton-github
2626

2727
- name: Run and save output
28-
# Sort the fields array by name to ensure consistent ordering
29-
run: |
30-
./connector config | jq '.fields |= sort_by(.name)' > config_schema.json
28+
run: ./connector config > config_schema.json
3129

3230
- name: Commit changes
3331
uses: EndBug/add-and-commit@v9

go.mod

Lines changed: 1 addition & 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.8
6+
github.com/conductorone/baton-sdk v0.3.10
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

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.8 h1:AuRBGVbgw8TcDPix7Ho7qwMucsPqP8hIh2lABUbY7Xg=
62-
github.com/conductorone/baton-sdk v0.3.8/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0=
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=
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/config/config.go

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,38 @@ import (
44
"github.com/conductorone/baton-sdk/pkg/field"
55
)
66

7+
// TODO (mb): Make sure we don't need field.WithRequired(true) for required fields.
78
var (
89
accessTokenField = field.StringField(
910
"token",
11+
field.WithDisplayName("Personal access token"),
1012
field.WithDescription("The GitHub access token used to connect to the GitHub API."),
13+
field.WithIsSecret(true),
1114
)
1215
orgsField = field.StringSliceField(
1316
"orgs",
17+
field.WithDisplayName("Organizations"),
1418
field.WithDescription("Limit syncing to specific organizations."),
1519
)
1620
instanceUrlField = field.StringField(
1721
"instance-url",
22+
field.WithDisplayName("GitHub instance URL"),
1823
field.WithDescription(`The GitHub instance URL to connect to. (default "https://github.com")`),
1924
)
2025
appIDField = field.StringField(
2126
"app-id",
27+
field.WithDisplayName("GitHub App ID"),
2228
field.WithDescription("The GitHub App to connect to."),
2329
)
2430

2531
appPrivateKeyPath = field.StringField(
2632
"app-privatekey-path",
33+
field.WithDisplayName("GitHub App private key (.pem)"),
2734
field.WithDescription("Path to private key that is used to connect to the GitHub App"),
2835
)
2936
syncSecrets = field.BoolField(
3037
"sync-secrets",
38+
field.WithDisplayName("Sync secrets"),
3139
field.WithDescription(`Whether to sync secrets or not`),
3240
)
3341
fieldRelationships = []field.SchemaFieldRelationship{
@@ -43,11 +51,17 @@ var (
4351
)
4452

4553
//go:generate go run ./gen
46-
var Config = field.NewConfiguration([]field.SchemaField{
47-
accessTokenField,
48-
orgsField,
49-
instanceUrlField,
50-
syncSecrets,
51-
appIDField,
52-
appPrivateKeyPath,
53-
}, fieldRelationships...)
54+
var Config = field.NewConfiguration(
55+
[]field.SchemaField{
56+
accessTokenField,
57+
orgsField,
58+
instanceUrlField,
59+
syncSecrets,
60+
appIDField,
61+
appPrivateKeyPath,
62+
},
63+
field.WithConstraints(fieldRelationships...),
64+
field.WithConnectorDisplayName("GitHub v2"),
65+
field.WithHelpUrl("/docs/baton/github-v2"),
66+
field.WithIconUrl("/static/app-icons/github.svg"),
67+
)

vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go

Lines changed: 36 additions & 12 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/config/v1/config.pb.validate.go

Lines changed: 4 additions & 0 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/connector.pb.go

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

0 commit comments

Comments
 (0)