Skip to content

feat!: remove deprecated approval commands - #1036

Merged
AlexKantor87 merged 1 commit into
mainfrom
5125-remove-approvals
Jul 27, 2026
Merged

feat!: remove deprecated approval commands#1036
AlexKantor87 merged 1 commit into
mainfrom
5125-remove-approvals

Conversation

@ToreMerkely

Copy link
Copy Markdown
Contributor

Summary

  • Removes assert approval, get approval, list approvals, report approval, and request approval — all deprecated for a while
  • Removes the request parent command, since request approval was its only subcommand
  • Cleans up related test fixtures, test helpers, and a dead doc-generator special case

Test plan

  • make build
  • make vet
  • make lint
  • make test_integration (run locally, passing)

🤖 Generated with Claude Code

Removes kosli assert approval, get approval, list approvals,
report approval, and request approval, all of which have been
deprecated for a while. The request parent command is also
removed since request approval was its only subcommand.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ToreMerkely's task in 2m 12s —— View job


PR Review: remove deprecated approval commands

  • Static analysis (go build, go vet, go mod tidy)
  • Review command deletions & registration cleanup
  • Check for dangling references to removed commands
  • Review docgen change
  • Post review

This is a clean, well-scoped deletion. All static checks pass and I found no functional issues.

Static analysis ✅

Check Result
go build ./... ✅ passes
go vet ./... ✅ clean
go mod tidy + git diff ✅ no changes (deps still tidy)

go vet compiles test files too, so the removal of the CreateApproval helper, the reportApprovalOptions/ApprovalPayload types, and the cmdDeprecationLine helper leaves no dangling test references.

What I verified

  • Registration cleanup is complete. All five commands are unregistered from their parents (assert.go, get.go, list.go, report.go) and the now-empty request parent is removed from root.go. Grep for new{Assert,Get,List,Report,Request}ApprovalCmd and newRequestCmd returns zero hits.
  • No orphaned flag constants. The five approval-only flag strings (approvalEnvironmentNameFlag, approvalDescriptionFlag, approvalUserDataFlag, approverFlag) are removed from root.go, and none are referenced elsewhere.
  • Unused import removed. fmt is correctly dropped from testHelpers.go after cmdDeprecationLine was deleted (this is why go build stays green).
  • Test fixtures cleaned. The three golden files and the two pipelineCommand_test.go cases are gone; no test still references the deleted goldens.
  • docgen special-case removal is safe. In mintlify.go, dropping "kosli report approval" / "kosli request approval" from the branch is correct — both fell through to the same ```shell rendering as the else if lines[0][0] != '#' branch anyway, so output for any surviving command is unchanged.

Minor (non-blocking)

  • internal/docgen/mintlify_test.go:49 still uses "kosli report approval" as the sample command name in the FrontMatter deprecated-flag test. It's harmless (the string is arbitrary and the test doesn't exercise a real command), but it's now a slightly stale reference to a command that no longer exists. Consider swapping it for a name of a command that still exists, e.g. "kosli report artifact", to avoid confusion for future readers.

Nice touches 👍

  • Removing the request parent rather than leaving an empty command — good hygiene.
  • Trimming the docgen special case and the fmt import shows attention to leftover dead code, not just deleting the obvious files.
  • Marked as feat!: — correctly signals the breaking change per Conventional Commits.

Since these are removals of long-deprecated commands, the main risk is external (users/CI still invoking them), which is a product decision, not a code issue. LGTM. ✅

@AlexKantor87
AlexKantor87 merged commit b7e0f6e into main Jul 27, 2026
20 checks passed
@AlexKantor87
AlexKantor87 deleted the 5125-remove-approvals branch July 27, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants