Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 32 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,55 @@ jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v3
go-version-file: go.mod
- name: Run linters
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.6
version: latest
args: --timeout=3m
go-test:
strategy:
matrix:
go-version: [1.23.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
- name: Checkout code
if: success()
uses: actions/setup-go@v4
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
go-version-file: go.mod
- name: go tests
run: go test -v -covermode=count -json ./... > test.json
- name: annotate go tests
if: always()
uses: guyarb/golang-test-annotations@v0.6.0
with:
test-results: test.json
test-results: test.json
ci:
runs-on: ubuntu-latest
env:
BATON_TOKEN: ${{ secrets.BATON_TOKEN }}
BATON_ORGS: ConductorOne
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build baton-github
run: go build ./cmd/baton-github
- name: Grant/revoke
uses: ConductorOne/github-workflows/actions/sync-test@v2
with:
connector: ./baton-github
baton-entitlement: 'repository:642588514:triage'
baton-principal: '166871869'
baton-principal-type: 'user'
15 changes: 7 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v4
go-version-file: go.mod
- name: Run linters
uses: golangci/golangci-lint-action@v8
with:
Expand All @@ -21,17 +21,16 @@ jobs:
go-test:
strategy:
matrix:
go-version: [ 1.23.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
- name: Checkout code
if: success()
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
go-version-file: go.mod
- name: go tests
run: go test -v -covermode=count -json ./... > test.json
- name: annotate go tests
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/conductorone/baton-github

go 1.23.4
go 1.25

require (
github.com/conductorone/baton-sdk v0.3.30
github.com/conductorone/baton-sdk v0.4.2
github.com/deckarep/golang-set/v2 v2.8.0
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
github.com/golang-jwt/jwt/v5 v5.2.2
Expand Down Expand Up @@ -70,7 +70,7 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/conductorone/baton-sdk v0.3.30 h1:KR6r1pMpssQW6EgcSMOvtmBpkd08KX1bGtvUUGSXqek=
github.com/conductorone/baton-sdk v0.3.30/go.mod h1:L55WO3ERMx1mfpjDgwK3jWNRGRF2E76WrQHmW6ev8VY=
github.com/conductorone/baton-sdk v0.4.2 h1:hj/aXdaz850EVqnErw9DN/+3864LSdVcwa6p3vMrAfI=
github.com/conductorone/baton-sdk v0.4.2/go.mod h1:Csa1C2KrI4TxJAtC3WjQqOn24u0g2f4/5FgiYqZWpN4=
github.com/conductorone/dpop v0.2.3 h1:s91U3845GHQ6P6FWrdNr2SEOy1ES/jcFs1JtKSl2S+o=
github.com/conductorone/dpop v0.2.3/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s=
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 h1:kLMCNIh0Mo2vbvvkCmJ3ixsPbXEJ6HPcW53Ku9yje3s=
Expand Down Expand Up @@ -155,8 +155,8 @@ github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHT
github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/enterprise_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (o *enterpriseRoleResourceType) Entitlements(
entitlement.WithDisplayName(resource.DisplayName),
entitlement.WithDescription(fmt.Sprintf("Assignment to %s enterprise role in GitHub", resource.DisplayName)),
entitlement.WithAnnotation(&v2.V1Identifier{
Id: fmt.Sprintf(resource.Id.Resource),
Id: resource.Id.Resource,
}),
entitlement.WithGrantableTo(resourceTypeUser),
))
Expand Down
4 changes: 3 additions & 1 deletion pkg/connector/invitation.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ type invitationResourceType struct {
orgs []string
}

var _ connectorbuilder.AccountManager = &invitationResourceType{}

func (i *invitationResourceType) ResourceType(_ context.Context) *v2.ResourceType {
return resourceTypeInvitation
}
Expand Down Expand Up @@ -122,7 +124,7 @@ func (i *invitationResourceType) CreateAccountCapabilityDetails(ctx context.Cont
func (i *invitationResourceType) CreateAccount(
ctx context.Context,
accountInfo *v2.AccountInfo,
credentialOptions *v2.CredentialOptions,
credentialOptions *v2.LocalCredentialOptions,
) (
connectorbuilder.CreateAccountResponse,
[]*v2.PlaintextData,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading