Repository navigation
Fix semicolon-separated parameter parsing for git count-contributors (#3052) - #3064
Closed
gajeshbhat wants to merge 1 commit into
Closed
gajeshbhat wants to merge 1 commit into
gajeshbhat wants to merge 1 commit into
Conversation
gajeshbhat
had a problem deploying
to
frogbot
September 18, 2025 00:56 — with
GitHub Actions
Failure
gajeshbhat
had a problem deploying
to
frogbot
September 18, 2025 05:42 — with
GitHub Actions
Failure
gajeshbhat
had a problem deploying
to
frogbot
September 18, 2025 05:54 — with
GitHub Actions
Failure
…(#3052) - Enhanced GetStringsArrFlagValue() to properly handle semicolon-separated values with trimming and empty string filtering - Enhanced overrideArrayIfSet() with improved parsing and error handling - Added comprehensive tests for semicolon parsing utility functions This fixes the issue where git count-contributors --repo-name parameter fails with multiple repositories due to shell parsing of unquoted semicolons and improves the underlying utility functions used by platform services commands.
Contributor
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.

What does this PR do?
Fixes the issue where
jf git count-contributors --repo-nameparameter fails when users provide semicolon-separated repository names. The problem occurs because the shell interprets unquoted semicolons as command separators, and the utility functions needed better parsing logic.Which issue does this PR fix?
Fixes jfrog/jfrog-cli-security#577
What type of PR is this?
Bug fix
What changes were made?
GetStringsArrFlagValue()inutils/cliutils/codegangstautils.goto properly handle semicolon-separated values with trimming and empty string filteringoverrideArrayIfSet()inutils/cliutils/utils.gowith improved parsing and error handlingutils/cliutils/semicolon_parsing_test.gocovering various edge cases and usage patternsHow should this be manually tested?
./build/build.sh./jf git count-contributors --repo-name=repo1;echo "ISSUE_DETECTED"./jf git count-contributors --repo-name="repo1;repo2;repo3" --other-required-flagsgo test ./utils/cliutils -v -run TestSemicolonDoes this PR introduce a breaking change?
No - all changes are backward compatible. Existing code continues to work while providing better parsing for new usage.
Additional Notes
The root cause was that users need to quote semicolon-separated values (e.g.,
--repo-name="repo1;repo2") to prevent shell interpretation, but the utility functions also needed improvements to handle edge cases properly.