Skip to content

feat(list flows): add --name and --ignore-case search flags#947

Merged
mbevc1 merged 3 commits into
mainfrom
20260609_list_args
Jun 9, 2026
Merged

feat(list flows): add --name and --ignore-case search flags#947
mbevc1 merged 3 commits into
mainfrom
20260609_list_args

Conversation

@mbevc1

@mbevc1 mbevc1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Wire the API's search_by_name and case_sensitive query parameters into kosli list flows via new --name and --ignore-case flags. The change is additive: when no --name is given the request URL is unchanged.

Closes #943

Wire the API's `search_by_name` and `case_sensitive` query parameters into
kosli list flows via new `--name` and `--ignore-case` flags. The change is
additive: when no `--name` is given the request URL is unchanged.

Closes #943
@mbevc1 mbevc1 added enhancement New feature or request customer-request For issues reported/inspired by customers - solution reported via community slack and to customer go Pull requests that update go code labels Jun 9, 2026
@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @mbevc1's task in 1m 44s —— View job


Review: PR #947--name / --ignore-case search flags for list flows

  • Gather context (read changed files, diff)
  • Static analysis (build, vet)
  • Code review
  • Post review feedback

Verdict: LGTM ✅ — clean, well-tested, additive change. The feedback from the previous review pass has been addressed.

Static analysis

Check Result
go build ./... ✅ pass
go vet ./cmd/... ✅ pass

What's good

  • Consistent with the codebase. The params := url.Values{}base + "?" + params.Encode() pattern matches listSnapshots.go, listRepos.go, and listApprovals.go. The extra if encoded := params.Encode(); encoded != "" guard is actually a small improvement over those — it avoids emitting a bare trailing ? when no search term is given, keeping the no---name request URL byte-identical to before (matches the "additive, URL unchanged" promise in the PR description).
  • Prior feedback resolved. The earlier note about o.name != "" being evaluated twice is fixed — the ignoreCase check is now nested under the name check, with a comment explaining why (case_sensitive only matters alongside a search term). The help text was also softened to "The Kosli API supports alphanumeric characters and '-'", so it no longer implies the CLI enforces a constraint it doesn't validate. Good resolution on both counts.
  • Thorough tests. Five new cases cover the matrix that matters: substring match, no-match → empty list, case-sensitive-by-default, --ignore-case override, and short flags -n/-i. The SetupTest seeds a deterministic flow name with an explanatory comment. goldenJson "non-empty" assertions follow the existing convention (getAttestation_test.go, listEnvironments_test.go).

Minor (non-blocking) observations

  • case_sensitive is only ever sent as "false" (when --ignore-case is set); the case-sensitive path relies on the server default. That's a reasonable choice and the comment documents it — just worth confirming the API default is indeed case-sensitive, which the "case sensitive by default" test exercises end-to-end. 👍
  • The --name help mentions the alphanumeric/- rule but there's still no client-side validation. Given the softened wording this is fine as-is; if you ever want a friendlier early error for invalid input, a small validation slice + error-case test would lock it in — but it's optional and out of scope for this PR.

Nice, tidy PR. No changes requested.

Comment thread cmd/kosli/listFlows.go
Comment thread cmd/kosli/root.go Outdated
@mbevc1 mbevc1 enabled auto-merge (squash) June 9, 2026 16:30
@mbevc1 mbevc1 changed the title feat(list flows): add --name and --case-sensitive search flags feat(list flows): add --name and --ignore-case search flags Jun 9, 2026
@mbevc1 mbevc1 merged commit 1a6bc8f into main Jun 9, 2026
20 checks passed
@mbevc1 mbevc1 deleted the 20260609_list_args branch June 9, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-request For issues reported/inspired by customers - solution reported via community slack and to customer enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flows: wire search_by_name into a --name/--search flag on kosli list flows

2 participants