Skip to content

Commit 77a1f31

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 97743bf + c78aaf7 commit 77a1f31

18 files changed

Lines changed: 773 additions & 32 deletions

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
attestations: write
3636
pull-requests: read
3737
steps:
38-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3939
with:
4040
fetch-depth: 0
4141
persist-credentials: false
@@ -129,7 +129,7 @@ jobs:
129129
# Only publish the normal AUR package for stable tags. Prereleases stay on GitHub Releases.
130130
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-')
131131
steps:
132-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
132+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
133133
with:
134134
persist-credentials: false
135135

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id-token: write
1919
contents: read
2020
steps:
21-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2222
with:
2323
persist-credentials: false
2424

@@ -34,7 +34,7 @@ jobs:
3434
path: results.sarif
3535
retention-days: 5
3636

37-
- uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
37+
- uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
3838
continue-on-error: true
3939
with:
4040
sarif_file: results.sarif

.github/workflows/security.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
contents: read
2020
steps:
21-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2222
with:
2323
fetch-depth: 0
2424
persist-credentials: false
@@ -37,15 +37,15 @@ jobs:
3737
security-events: write
3838
if: github.event_name != 'pull_request'
3939
steps:
40-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4141
with:
4242
persist-credentials: false
4343
- uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
4444
with:
4545
scan-type: fs
4646
format: sarif
4747
output: trivy-results.sarif
48-
- uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
48+
- uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
4949
with:
5050
sarif_file: trivy-results.sarif
5151
category: trivy
@@ -58,13 +58,13 @@ jobs:
5858
security-events: write
5959
if: github.event_name != 'pull_request'
6060
steps:
61-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
61+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6262
with:
6363
persist-credentials: false
64-
- uses: securego/gosec@4a3bd8af174872c778439083ded7adbf3747e770 # v2.26.1
64+
- uses: securego/gosec@9e6a9843d7a4a6e3e9a8539b02612c8a4aa3f889 # v2.27.1
6565
with:
6666
args: -no-fail -exclude=G304,G401,G501 -exclude-dir=e2e -fmt sarif -out gosec-results.sarif ./...
67-
- uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
67+
- uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
6868
with:
6969
sarif_file: gosec-results.sarif
7070
category: gosec
@@ -76,7 +76,7 @@ jobs:
7676
contents: read
7777
if: github.event_name == 'pull_request'
7878
steps:
79-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
79+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
8080
with:
8181
persist-credentials: false
8282
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
contents: read
1717
steps:
18-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1919
with:
2020
persist-credentials: false
2121

@@ -44,7 +44,7 @@ jobs:
4444
permissions:
4545
contents: read
4646
steps:
47-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
47+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4848
with:
4949
persist-credentials: false
5050

@@ -69,7 +69,7 @@ jobs:
6969
permissions:
7070
contents: read
7171
steps:
72-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
72+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7373
with:
7474
persist-credentials: false
7575

@@ -89,7 +89,7 @@ jobs:
8989
permissions:
9090
contents: read
9191
steps:
92-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
92+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
9393
with:
9494
persist-credentials: false
9595

@@ -106,7 +106,7 @@ jobs:
106106
permissions:
107107
contents: read
108108
steps:
109-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
109+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
110110
with:
111111
persist-credentials: false
112112

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
go = "1.26"
2+
go = "1.26.4"

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,22 @@ yay -S fizzy-cli
4949
```
5050

5151
**Homebrew (macOS):**
52+
53+
Latest stable Fizzy 3.x is available from the original tap:
54+
5255
```bash
53-
brew install basecamp/tap/fizzy
56+
brew install robzolkos/fizzy-cli/fizzy-cli
5457
```
5558

59+
Fizzy 4 release candidates are available from [Releases](https://github.com/basecamp/fizzy-cli/releases).
60+
61+
> [!WARNING]
62+
> The Basecamp Homebrew tap command is for Fizzy 4 stable once it is released. Release candidates are not published to Homebrew.
63+
>
64+
> ```bash
65+
> brew install --cask basecamp/tap/fizzy
66+
> ```
67+
5668
**Scoop (Windows):**
5769
```bash
5870
scoop bucket add basecamp https://github.com/basecamp/homebrew-tap
@@ -183,6 +195,8 @@ Configuration priority (highest to lowest):
183195

184196
`FIZZY_ACCOUNT` is accepted as a deprecated alias for `FIZZY_PROFILE`.
185197

198+
`FIZZY_NO_UPDATE_NOTIFIER=1` runs commands without update notifications.
199+
186200
Inspect the effective config and precedence:
187201

188202
```bash

go.mod

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
module github.com/basecamp/fizzy-cli
22

3-
go 1.26
3+
go 1.26.4
44

55
require (
66
github.com/basecamp/cli v0.2.1
7-
github.com/basecamp/fizzy-sdk/go v0.2.2
7+
github.com/basecamp/fizzy-sdk/go v0.2.3
88
github.com/charmbracelet/huh v1.0.0
99
github.com/charmbracelet/lipgloss v1.1.0
1010
github.com/charmbracelet/x/term v0.2.2
11+
github.com/hashicorp/go-version v1.9.0
1112
github.com/itchyny/gojq v0.12.19
1213
github.com/mattn/go-isatty v0.0.22
1314
github.com/muesli/termenv v0.16.0

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3v
88
github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=
99
github.com/basecamp/cli v0.2.1 h1:8GyehPVtsTXla0oOPu4QgXRjwwzJ99prlByvyi+0HRQ=
1010
github.com/basecamp/cli v0.2.1/go.mod h1:p8tt/DatJ2LAzWO6N6tNfV8x3gF5T3IxDTo+U8FfWPo=
11-
github.com/basecamp/fizzy-sdk/go v0.2.2 h1:o2unUWdeJlUlm4L/0Y+/VhLiAjdR9tMNulSyTwFlg+c=
12-
github.com/basecamp/fizzy-sdk/go v0.2.2/go.mod h1:XvOTc+2/6NaECvb2mVhIMq2pNsl9P2wNqwvybIUtQ2g=
11+
github.com/basecamp/fizzy-sdk/go v0.2.3 h1:s9VdTb7gEzU5z4900tsIQ8gcniV9mM2uwRJqwXTaoEg=
12+
github.com/basecamp/fizzy-sdk/go v0.2.3/go.mod h1:XvOTc+2/6NaECvb2mVhIMq2pNsl9P2wNqwvybIUtQ2g=
1313
github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY=
1414
github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc=
1515
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws=
@@ -57,6 +57,8 @@ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6
5757
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
5858
github.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=
5959
github.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
60+
github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA=
61+
github.com/hashicorp/go-version v1.9.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
6062
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
6163
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
6264
github.com/itchyny/gojq v0.12.19 h1:ttXA0XCLEMoaLOz5lSeFOZ6u6Q3QxmG46vfgI4O0DEs=

internal/commands/column.go

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,15 @@ var columnCreateCmd = &cobra.Command{
131131
return newRequiredFlagError("name")
132132
}
133133

134+
color, err := normalizeColumnColor(columnCreateColor)
135+
if err != nil {
136+
return err
137+
}
138+
134139
ac := getSDK()
135140
req := &generated.CreateColumnRequest{Name: columnCreateName}
136-
if columnCreateColor != "" {
137-
req.Color = columnCreateColor
141+
if color != "" {
142+
req.Color = color
138143
}
139144

140145
data, resp, err := ac.Columns().Create(cmd.Context(), boardID, req)
@@ -199,12 +204,17 @@ var columnUpdateCmd = &cobra.Command{
199204

200205
columnID := args[0]
201206

207+
color, err := normalizeColumnColor(columnUpdateColor)
208+
if err != nil {
209+
return err
210+
}
211+
202212
req := &generated.UpdateColumnRequest{}
203213
if columnUpdateName != "" {
204214
req.Name = columnUpdateName
205215
}
206-
if columnUpdateColor != "" {
207-
req.Color = columnUpdateColor
216+
if color != "" {
217+
req.Color = color
208218
}
209219

210220
data, _, err := getSDK().Columns().Update(cmd.Context(), boardID, columnID, req)
@@ -343,13 +353,13 @@ func init() {
343353
// Create
344354
columnCreateCmd.Flags().StringVar(&columnCreateBoard, "board", "", "Board ID (required)")
345355
columnCreateCmd.Flags().StringVar(&columnCreateName, "name", "", "Column name (required)")
346-
columnCreateCmd.Flags().StringVar(&columnCreateColor, "color", "", "Column color")
356+
columnCreateCmd.Flags().StringVar(&columnCreateColor, "color", "", "Column color ("+columnColorNamesHelp+"; or supported API color value)")
347357
columnCmd.AddCommand(columnCreateCmd)
348358

349359
// Update
350360
columnUpdateCmd.Flags().StringVar(&columnUpdateBoard, "board", "", "Board ID (required)")
351361
columnUpdateCmd.Flags().StringVar(&columnUpdateName, "name", "", "Column name")
352-
columnUpdateCmd.Flags().StringVar(&columnUpdateColor, "color", "", "Column color")
362+
columnUpdateCmd.Flags().StringVar(&columnUpdateColor, "color", "", "Column color ("+columnColorNamesHelp+"; or supported API color value)")
353363
columnCmd.AddCommand(columnUpdateCmd)
354364

355365
// Delete

internal/commands/column_color.go

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package commands
2+
3+
import (
4+
"fmt"
5+
"strings"
6+
7+
"github.com/basecamp/fizzy-cli/internal/errors"
8+
)
9+
10+
type columnColor struct {
11+
Name string
12+
Value string
13+
}
14+
15+
var columnColors = []columnColor{
16+
{Name: "blue", Value: "var(--color-card-default)"},
17+
{Name: "gray", Value: "var(--color-card-1)"},
18+
{Name: "tan", Value: "var(--color-card-2)"},
19+
{Name: "yellow", Value: "var(--color-card-3)"},
20+
{Name: "lime", Value: "var(--color-card-4)"},
21+
{Name: "aqua", Value: "var(--color-card-5)"},
22+
{Name: "violet", Value: "var(--color-card-6)"},
23+
{Name: "purple", Value: "var(--color-card-7)"},
24+
{Name: "pink", Value: "var(--color-card-8)"},
25+
}
26+
27+
var columnColorNamesHelp = func() string {
28+
names := make([]string, len(columnColors))
29+
for i, color := range columnColors {
30+
names[i] = color.Name
31+
}
32+
return strings.Join(names, ", ")
33+
}()
34+
35+
func normalizeColumnColor(input string) (string, error) {
36+
color := strings.TrimSpace(input)
37+
if color == "" {
38+
return "", nil
39+
}
40+
41+
for _, valid := range columnColors {
42+
if strings.EqualFold(color, valid.Name) || color == valid.Value {
43+
return valid.Value, nil
44+
}
45+
}
46+
47+
return "", errors.NewInvalidArgsError(fmt.Sprintf("--color must be one of: %s; or a supported API color value like %s (got %q)", columnColorNamesHelp, columnColors[0].Value, input))
48+
}

0 commit comments

Comments
 (0)