Skip to content

Commit 1357c92

Browse files
authored
Merge branch 'main' into codex/add-support-for-user-list-syntax-in-store-tests
2 parents 8492b49 + bb88057 commit 1357c92

6 files changed

Lines changed: 36 additions & 22 deletions

File tree

.github/workflows/main.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.5.4
2525
with:
2626
fetch-depth: 0
27-
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
27+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2828
with:
2929
cache-dependency-path: './go.sum'
3030
check-latest: true
3131
go-version: ${{ env.GO_VERSION }}
3232
- name: golangci-lint
33-
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
33+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3434
with:
3535
version: latest
3636
args: -v -c .golangci.yaml
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.5.4
4343
with:
4444
fetch-depth: 0
45-
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
45+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
4646
with:
4747
cache-dependency-path: './go.sum'
4848
check-latest: true
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
fetch-depth: 0
6161

62-
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
62+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
6363
with:
6464
cache-dependency-path: './go.sum'
6565
check-latest: true
@@ -87,7 +87,7 @@ jobs:
8787
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.5.4
8888
with:
8989
fetch-depth: 0
90-
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
90+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
9191
with:
9292
cache-dependency-path: './go.sum'
9393
check-latest: true
@@ -105,13 +105,13 @@ jobs:
105105
fetch-depth: 0
106106

107107
- name: Set up Go
108-
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
108+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
109109
with:
110110
cache-dependency-path: './go.sum'
111111
check-latest: true
112112
go-version: ${{ env.GO_VERSION }}
113113

114-
- uses: anchore/sbom-action/download-syft@9f7302141466aa6482940f15371237e9d9f4c34a # v0.19.0
114+
- uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
115115

116116
- name: Run GoReleaser
117117
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
@@ -144,7 +144,7 @@ jobs:
144144
fetch-depth: 0
145145

146146
- name: Set up Go
147-
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
147+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
148148
with:
149149
cache-dependency-path: './go.sum'
150150
check-latest: true
@@ -157,7 +157,7 @@ jobs:
157157
password: ${{ secrets.DOCKERHUB_TOKEN }}
158158

159159
- uses: sigstore/cosign-installer@3454372f43399081ed03b604cb2d021dabca52bb # v3.8.2
160-
- uses: anchore/sbom-action/download-syft@9f7302141466aa6482940f15371237e9d9f4c34a # v0.19.0
160+
- uses: anchore/sbom-action/download-syft@e11c554f704a0b820cbf8c51673f6945e0731532 # v0.20.0
161161

162162
- name: Run GoReleaser
163163
id: goreleaser

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
# Changelog
22

3-
#### [Unreleased](https://github.com/openfga/cli/compare/v0.6.6...HEAD)
3+
#### [Unreleased](https://github.com/openfga/cli/compare/v0.7.0...HEAD)
4+
5+
#### [0.7.0](https://github.com/openfga/cli/compare/v0.6.6...v0.7.0) (2025-06-10)
6+
7+
> [!NOTE]
8+
> This release includes a change to the configuration file (`.fga.yaml`) lookup order to simplify multi-project usage.
9+
> The lookup is now in the following order:
10+
> * Current working directory (New)
11+
> * OS-specific [user configuration directory](https://pkg.go.dev/os#UserConfigDir) (e.g. `~/.config`)
12+
> * `fga` directory within the OS-specific [user configuration directory](https://pkg.go.dev/os#UserConfigDir) (e.g. `~/.config/fga`)
13+
> * OS-specific [home directory](https://pkg.go.dev/os#UserHomeDir) (e.g. `~/`)
14+
15+
Added:
16+
- Include current working directory in the config file resolution (#504) - thanks @OsmanMElsayed
417

518
Fixed:
619
- Bump OpenFGA to v1.8.13 to resolve a security vulnerability [GHSA-c72g-53hw-82q7](https://github.com/openfga/openfga/security/advisories/GHSA-c72g-53hw-82q7)
720

8-
921
#### [0.6.6](https://github.com/openfga/cli/compare/v0.6.5...v0.6.6) (2025-04-23)
1022

1123
Added:

cmd/model/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var listCmd = &cobra.Command{
7777
clientConfig := cmdutils.GetClientConfig(cmd)
7878
fgaClient, err := clientConfig.GetFgaClient()
7979
if err != nil {
80-
return fmt.Errorf("failed to intialized FGA client due to %w", err)
80+
return fmt.Errorf("failed to initialize FGA client due to %w", err)
8181
}
8282

8383
maxPages, err := cmd.Flags().GetInt("max-pages")

cmd/root.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ func initConfig() {
102102
homeDir, err := os.UserHomeDir()
103103
cobra.CheckErr(err)
104104

105-
// Search for .fga.yaml in:
106-
// 1- XDG_CONFIG/User Config Directory
107-
// 2- fga directory under User Config Directory
108-
// 3- Home directory
105+
// Search for .fga.yml or .fga.yaml in:
106+
// 1- The current working directory
107+
// 2- The user-specific config directory
108+
// 3- The fga subdirectory under the user-specific config directory
109+
// 4- The current user's home directory
110+
viperInstance.AddConfigPath(".")
109111
viperInstance.AddConfigPath(configDir)
110112
viperInstance.AddConfigPath(configDir + "/" + "fga")
111113
viperInstance.AddConfigPath(homeDir)

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/muesli/mango-cobra v1.2.0
1212
github.com/muesli/roff v0.1.0
1313
github.com/nwidger/jsoncolor v0.3.2
14-
github.com/oklog/ulid/v2 v2.1.0
14+
github.com/oklog/ulid/v2 v2.1.1
1515
github.com/openfga/api/proto v0.0.0-20250127102726-f9709139a369
1616
github.com/openfga/go-sdk v0.7.1
1717
github.com/openfga/language/pkg/go v0.2.0-beta.2.0.20250220223040-ed0cfba54336
@@ -23,7 +23,7 @@ require (
2323
github.com/spf13/viper v1.20.1
2424
github.com/stretchr/testify v1.10.0
2525
go.uber.org/mock v0.5.2
26-
golang.org/x/time v0.11.0
26+
golang.org/x/time v0.12.0
2727
google.golang.org/protobuf v1.36.6
2828
gopkg.in/yaml.v3 v3.0.1
2929
)

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
162162
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
163163
github.com/nwidger/jsoncolor v0.3.2 h1:rVJJlwAWDJShnbTYOQ5RM7yTA20INyKXlJ/fg4JMhHQ=
164164
github.com/nwidger/jsoncolor v0.3.2/go.mod h1:Cs34umxLbJvgBMnVNVqhji9BhoT/N/KinHqZptQ7cf4=
165-
github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU=
166-
github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
165+
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
166+
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
167167
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
168168
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
169169
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
@@ -331,8 +331,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
331331
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
332332
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
333333
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
334-
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
335-
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
334+
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
335+
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
336336
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
337337
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
338338
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=

0 commit comments

Comments
 (0)