Skip to content

Commit 4865375

Browse files
authored
Bump baton-sdk to v0.1.0 (#15)
* Update ci and makefile for latest versions * make update-deps * Fixes for baton-sdk v0.1.0
1 parent 5d79c33 commit 4865375

File tree

1,217 files changed

+232727
-135365
lines changed

Some content is hidden

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

1,217 files changed

+232727
-135365
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- name: Install Go
8-
uses: actions/setup-go@v3
8+
uses: actions/setup-go@v4
99
with:
10-
go-version: 1.19.x
10+
go-version: 1.20.x
1111
- name: Checkout code
1212
uses: actions/checkout@v3
1313
- name: Run linters
@@ -18,13 +18,13 @@ jobs:
1818
go-test:
1919
strategy:
2020
matrix:
21-
go-version: [1.18.x, 1.19.x]
21+
go-version: [1.20.x]
2222
platform: [ubuntu-latest]
2323
runs-on: ${{ matrix.platform }}
2424
steps:
2525
- name: Install Go
2626
if: success()
27-
uses: actions/setup-go@v3
27+
uses: actions/setup-go@v4
2828
with:
2929
go-version: ${{ matrix.go-version }}
3030
- name: Checkout code

.github/workflows/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Install Go
11-
uses: actions/setup-go@v3
11+
uses: actions/setup-go@v4
1212
with:
13-
go-version: 1.19.x
13+
go-version: 1.20.x
1414
- name: Checkout code
1515
uses: actions/checkout@v3
1616
- name: Run linters
@@ -21,13 +21,13 @@ jobs:
2121
go-test:
2222
strategy:
2323
matrix:
24-
go-version: [ 1.18.x, 1.19.x ]
24+
go-version: [ 1.20.x ]
2525
platform: [ ubuntu-latest ]
2626
runs-on: ${{ matrix.platform }}
2727
steps:
2828
- name: Install Go
2929
if: success()
30-
uses: actions/setup-go@v3
30+
uses: actions/setup-go@v4
3131
with:
3232
go-version: ${{ matrix.go-version }}
3333
- name: Checkout code

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616
- name: Set up Go
17-
uses: actions/setup-go@v2
17+
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.19
19+
go-version: 1.20.x
2020
- name: Set up Gon
2121
run: brew tap mitchellh/gon && brew install mitchellh/gon/gon
2222
- name: Import Keychain Certs
@@ -40,9 +40,9 @@ jobs:
4040
with:
4141
fetch-depth: 0
4242
- name: Set up Go
43-
uses: actions/setup-go@v2
43+
uses: actions/setup-go@v4
4444
with:
45-
go-version: 1.19
45+
go-version: 1.20.x
4646
- name: Docker Login
4747
uses: docker/login-action@v1
4848
with:

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
GOOS = $(shell go env GOOS)
22
GOARCH = $(shell go env GOARCH)
33
BUILD_DIR = dist/${GOOS}_${GOARCH}
4-
OUTPUT_PATH = ${BUILD_DIR}/$(notdir $(CURDIR))
4+
5+
ifeq ($(GOOS),windows)
6+
OUTPUT_PATH = ${BUILD_DIR}/baton-github.exe
7+
else
8+
OUTPUT_PATH = ${BUILD_DIR}/baton-github
9+
endif
510

611
.PHONY: build
712
build:
8-
rm -f ${OUTPUT_PATH}
9-
mkdir -p ${BUILD_DIR}
10-
go build -o ${OUTPUT_PATH} cmd/baton-github/*.go
13+
go build -o ${OUTPUT_PATH} ./cmd/baton-github
1114

1215
.PHONY: update-deps
1316
update-deps:

cmd/baton-github/main.go

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
"github.com/conductorone/baton-sdk/pkg/cli"
99
"github.com/conductorone/baton-sdk/pkg/connectorbuilder"
10-
"github.com/conductorone/baton-sdk/pkg/sdk"
1110
"github.com/conductorone/baton-sdk/pkg/types"
1211
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
1312
"go.uber.org/zap"
@@ -21,7 +20,7 @@ func main() {
2120
ctx := context.Background()
2221

2322
cfg := &config{}
24-
cmd, err := cli.NewCmd(ctx, "baton-github", cfg, validateConfig, getConnector, run)
23+
cmd, err := cli.NewCmd(ctx, "baton-github", cfg, validateConfig, getConnector)
2524
if err != nil {
2625
fmt.Fprintln(os.Stderr, err.Error())
2726
os.Exit(1)
@@ -52,28 +51,3 @@ func getConnector(ctx context.Context, cfg *config) (types.ConnectorServer, erro
5251

5352
return c, nil
5453
}
55-
56-
// run is where the process of syncing with the connector is implemented.
57-
func run(ctx context.Context, cfg *config) error {
58-
l := ctxzap.Extract(ctx)
59-
60-
c, err := getConnector(ctx, cfg)
61-
if err != nil {
62-
return err
63-
}
64-
65-
r, err := sdk.NewConnectorRunner(ctx, c, cfg.C1zPath)
66-
if err != nil {
67-
l.Error("error creating connector runner", zap.Error(err))
68-
return err
69-
}
70-
defer r.Close()
71-
72-
err = r.Run(ctx)
73-
if err != nil {
74-
l.Error("error running connector", zap.Error(err))
75-
return err
76-
}
77-
78-
return nil
79-
}

go.mod

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,91 @@
11
module github.com/conductorone/baton-github
22

3-
go 1.19
3+
go 1.20
44

55
require (
6-
github.com/conductorone/baton-sdk v0.0.22
6+
github.com/conductorone/baton-sdk v0.1.0
77
github.com/google/go-github/v41 v41.0.0
8-
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
9-
github.com/shurcooL/githubv4 v0.0.0-20221229060216-a8d4a561cc93
10-
github.com/spf13/cobra v1.6.1
8+
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
9+
github.com/shurcooL/githubv4 v0.0.0-20230424031643-6cea62ecd5a9
10+
github.com/spf13/cobra v1.7.0
1111
go.uber.org/zap v1.24.0
12-
golang.org/x/oauth2 v0.2.0
13-
golang.org/x/text v0.5.0
14-
google.golang.org/grpc v1.51.0
15-
google.golang.org/protobuf v1.28.1
12+
golang.org/x/oauth2 v0.8.0
13+
golang.org/x/text v0.9.0
14+
google.golang.org/grpc v1.55.0
15+
google.golang.org/protobuf v1.30.0
1616
)
1717

1818
require (
1919
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
20-
github.com/aws/aws-sdk-go-v2 v1.17.2 // indirect
20+
github.com/aws/aws-sdk-go-v2 v1.18.0 // indirect
2121
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
22-
github.com/aws/aws-sdk-go-v2/config v1.18.4 // indirect
23-
github.com/aws/aws-sdk-go-v2/credentials v1.13.4 // indirect
24-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.20 // indirect
25-
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.43 // indirect
26-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.26 // indirect
27-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.20 // indirect
28-
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.27 // indirect
29-
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.17 // indirect
22+
github.com/aws/aws-sdk-go-v2/config v1.18.25 // indirect
23+
github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect
24+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
25+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67 // indirect
26+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect
27+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect
28+
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect
29+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 // indirect
3030
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
31-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.21 // indirect
32-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.20 // indirect
33-
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.20 // indirect
34-
github.com/aws/aws-sdk-go-v2/service/s3 v1.29.5 // indirect
35-
github.com/aws/aws-sdk-go-v2/service/sso v1.11.26 // indirect
36-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.9 // indirect
37-
github.com/aws/aws-sdk-go-v2/service/sts v1.17.6 // indirect
31+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 // indirect
32+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect
33+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect
34+
github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 // indirect
35+
github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect
36+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect
37+
github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 // indirect
3838
github.com/aws/smithy-go v1.13.5 // indirect
3939
github.com/doug-martin/goqu/v9 v9.18.0 // indirect
40-
github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect
40+
github.com/dustin/go-humanize v1.0.1 // indirect
41+
github.com/envoyproxy/protoc-gen-validate v1.0.1 // indirect
4142
github.com/fsnotify/fsnotify v1.6.0 // indirect
42-
github.com/glebarez/go-sqlite v1.19.5 // indirect
43-
github.com/golang/protobuf v1.5.2 // indirect
43+
github.com/glebarez/go-sqlite v1.21.1 // indirect
44+
github.com/go-jose/go-jose/v3 v3.0.0 // indirect
45+
github.com/go-ole/go-ole v1.2.6 // indirect
46+
github.com/golang/protobuf v1.5.3 // indirect
4447
github.com/google/go-querystring v1.1.0 // indirect
4548
github.com/google/uuid v1.3.0 // indirect
4649
github.com/hashicorp/hcl v1.0.0 // indirect
4750
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4851
github.com/jmespath/go-jmespath v0.4.0 // indirect
49-
github.com/klauspost/compress v1.15.12 // indirect
50-
github.com/magiconair/properties v1.8.6 // indirect
51-
github.com/mattn/go-isatty v0.0.16 // indirect
52+
github.com/klauspost/compress v1.16.5 // indirect
53+
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
54+
github.com/magiconair/properties v1.8.7 // indirect
55+
github.com/mattn/go-isatty v0.0.19 // indirect
5256
github.com/mitchellh/mapstructure v1.5.0 // indirect
53-
github.com/pelletier/go-toml v1.9.5 // indirect
54-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
55-
github.com/remyoudompheng/bigfft v0.0.0-20220927061507-ef77025ab5aa // indirect
57+
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
58+
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
59+
github.com/pquerna/xjwt v0.2.0 // indirect
60+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
5661
github.com/segmentio/ksuid v1.0.4 // indirect
62+
github.com/shirou/gopsutil/v3 v3.23.5 // indirect
63+
github.com/shoenig/go-m1cpu v0.1.6 // indirect
5764
github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 // indirect
58-
github.com/spf13/afero v1.9.3 // indirect
59-
github.com/spf13/cast v1.5.0 // indirect
65+
github.com/spf13/afero v1.9.5 // indirect
66+
github.com/spf13/cast v1.5.1 // indirect
6067
github.com/spf13/jwalterweatherman v1.1.0 // indirect
6168
github.com/spf13/pflag v1.0.5 // indirect
62-
github.com/spf13/viper v1.14.0 // indirect
63-
github.com/subosito/gotenv v1.4.1 // indirect
64-
go.uber.org/atomic v1.10.0 // indirect
65-
go.uber.org/multierr v1.8.0 // indirect
69+
github.com/spf13/viper v1.16.0 // indirect
70+
github.com/subosito/gotenv v1.4.2 // indirect
71+
github.com/tklauser/go-sysconf v0.3.11 // indirect
72+
github.com/tklauser/numcpus v0.6.0 // indirect
73+
github.com/yusufpapurcu/wmi v1.2.3 // indirect
74+
go.uber.org/atomic v1.11.0 // indirect
75+
go.uber.org/multierr v1.11.0 // indirect
6676
go.uber.org/ratelimit v0.2.0 // indirect
67-
golang.org/x/crypto v0.3.0 // indirect
68-
golang.org/x/net v0.2.0 // indirect
69-
golang.org/x/sys v0.3.0 // indirect
77+
golang.org/x/crypto v0.9.0 // indirect
78+
golang.org/x/net v0.10.0 // indirect
79+
golang.org/x/sys v0.8.0 // indirect
80+
golang.org/x/term v0.8.0 // indirect
7081
google.golang.org/appengine v1.6.7 // indirect
71-
google.golang.org/genproto v0.0.0-20221205194025-8222ab48f5fc // indirect
82+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
7283
gopkg.in/ini.v1 v1.67.0 // indirect
84+
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
7385
gopkg.in/yaml.v2 v2.4.0 // indirect
7486
gopkg.in/yaml.v3 v3.0.1 // indirect
75-
modernc.org/libc v1.21.5 // indirect
87+
modernc.org/libc v1.22.6 // indirect
7688
modernc.org/mathutil v1.5.0 // indirect
7789
modernc.org/memory v1.5.0 // indirect
78-
modernc.org/sqlite v1.20.0 // indirect
90+
modernc.org/sqlite v1.22.1 // indirect
7991
)

0 commit comments

Comments
 (0)