Skip to content

Commit

Permalink
Merge branch 'main' into fix/361
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhant-K-code authored Jul 20, 2024
2 parents e3d8ee1 + 0c425bc commit 2dc1b14
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.5.4
with:
fetch-depth: 0
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.5.4
with:
fetch-depth: 0
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
Expand All @@ -59,7 +59,7 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.5.4
with:
fetch-depth: 0
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
Expand All @@ -105,13 +105,13 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
go-version: ${{ env.GO_VERSION }}

- uses: anchore/sbom-action/download-syft@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0
- uses: anchore/sbom-action/download-syft@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
cache-dependency-path: './go.sum'
check-latest: true
Expand All @@ -157,7 +157,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
- uses: anchore/sbom-action/download-syft@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0
- uses: anchore/sbom-action/download-syft@95b086ac308035dc0850b3853be5b7ab108236a8 # v0.16.1

- name: Run GoReleaser
id: goreleaser
Expand Down
17 changes: 9 additions & 8 deletions cmd/store/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ import (
"strings"
"time"

"github.com/openfga/go-sdk/client"
"github.com/schollz/progressbar/v3"

"github.com/openfga/go-sdk/client"
"github.com/spf13/cobra"

"github.com/openfga/cli/cmd/model"
Expand Down Expand Up @@ -75,19 +76,19 @@ func updateStore(
storeID string,
) (*CreateStoreAndModelResponse, error) {
store, err := fgaClient.GetStore(context.Background()).Execute()
if err != nil {
return nil, fmt.Errorf("failed to get store: %w", err)
}

response := &CreateStoreAndModelResponse{
Store: client.ClientCreateStoreResponse{
CreatedAt: store.GetCreatedAt(),
Id: store.GetId(),
Name: store.GetName(),
UpdatedAt: store.GetUpdatedAt(),
Id: storeID,
},
}

if err != nil {
response.Store.CreatedAt = store.GetCreatedAt()
response.Store.Name = store.GetName()
response.Store.UpdatedAt = store.GetUpdatedAt()
}

authModel := authorizationmodel.AuthzModel{}
clientConfig.StoreID = storeID

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ require (
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/grpc v1.64.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA=
google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down

0 comments on commit 2dc1b14

Please sign in to comment.