Skip to content

refactor: replace validation with composable interface-based validators#728

Merged
christeredvartsen merged 8 commits into
mainfrom
validation
May 8, 2026
Merged

refactor: replace validation with composable interface-based validators#728
christeredvartsen merged 8 commits into
mainfrom
validation

Conversation

@christeredvartsen
Copy link
Copy Markdown
Member

Replace CheckTeam/CheckEnvironment string-checking functions with RequireTeam/RequireEnvironment/RequireTeamAndEnvironment validators that use interfaces (teamChecker, envChecker) and compose via naistrix.ValidateFuncs.

Add HasTeam/HasEnvironment methods to AdditionalFlags, remove duplicated validateSingleEnvironmentFlagUsage across packages, and update all command ValidateFunc fields to use the new pattern.

Replace CheckTeam/CheckEnvironment string-checking functions with
RequireTeam/RequireEnvironment/RequireTeamAndEnvironment validators
that use interfaces (teamChecker, envChecker) and compose via
naistrix.ValidateFuncs.

Add HasTeam/HasEnvironment methods to AdditionalFlags, remove
duplicated validateSingleEnvironmentFlagUsage across packages, and
update all command ValidateFunc fields to use the new pattern.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📝 Changelog preview

Below is a preview of the Changelog that will be added to the next release. Only commit messages that follow the Conventional Commits specification will be included in the Changelog.

v5.28.2 - 2026-05-08

Full Changelog: v5.28.1...v5.28.2

⚙️ Miscellaneous Changes

  • Replace validation with composable interface-based validators (196a620)
  • Use new validators (77ce1ad)
  • Remove usage of RequiredTeam from debug command (4b7dff5)
  • Update validation for team and environment (6247ea1)
  • Set validation on parent (4b0ab38)
  • Use naistrix instead of pterm (f853f86)
  • Reorder args to the same order used elsewhere (f7027b2)
  • Remove superfluous funcs (317c650)

@christeredvartsen christeredvartsen marked this pull request as draft May 8, 2026 10:55
@christeredvartsen christeredvartsen marked this pull request as draft May 8, 2026 10:55
@christeredvartsen christeredvartsen marked this pull request as ready for review May 8, 2026 14:01
@christeredvartsen christeredvartsen enabled auto-merge (rebase) May 8, 2026 14:01
@christeredvartsen christeredvartsen merged commit a7a4d57 into main May 8, 2026
19 checks passed
@christeredvartsen christeredvartsen deleted the validation branch May 8, 2026 14:03
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.

1 participant