feat(cli): add -C cohort flag to sprouts list and jobs list#272
Merged
Conversation
Add cohort targeting support to additional CLI commands: - sprouts list: new -C/--cohort flag filters the sprout list to only members of the specified cohort - jobs list: new -C/--cohort flag resolves a cohort and fetches jobs for each member sprout (mutually exclusive with positional sproutID argument) Also adds targeting_test.go with comprehensive tests covering: - resolveEffectiveTarget edge cases (single, regex, comma-separated, both-set error, neither-set error) - Flag registration verification for all commands that support cohort targeting (cook, cmd, test, ssh, sprouts list, jobs list) - Cook Use string documentation check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends cohort targeting (-C flag) to additional CLI commands that benefit from it:
Changes
sprouts list -C <cohort>--stateand--onlinefiltersjobs list -C <cohort>Cohort targeting coverage
cook-Ccmd-Ctest ping-Cssh-Csprouts list-Cjobs list-CTests
New
targeting_test.gowith comprehensive coverage:All existing tests pass. Lint clean.