Open
Conversation
Automatically converts the org_url_slug parameter to lowercase during argument parsing to ensure consistent organization slug handling regardless of how the user provides the value. Implements TRUNK-17528 Slack thread: https://trunk-io.slack.com/archives/C09E85RBK0B/p1770759586804229?thread_ts=1770753745.539689&cid=C09E85RBK0B https://claude.ai/code/session_01Gn6ectQLY8ec7UwMP1xk6V
|
Merging to
|
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
This change ensures that the
org_url_slugargument is consistently normalized to lowercase, both when parsed from command-line arguments and when constructed programmatically.Key Changes
parse_org_url_slugvalue parser function that converts the input string to lowercaseorg_url_slugargument definition to automatically normalize CLI inputUploadArgs::new()constructor to also normalize theorg_url_slugparameter to lowercase for consistencyImplementation Details
The normalization is now applied at two entry points:
value_parserattribute ensures any org_url_slug provided via command line is lowercasedUploadArgs::new()method normalizes the parameter to handle cases where UploadArgs is constructed directly in codeThis prevents inconsistencies and potential issues with organization URL slug comparisons or lookups that may be case-sensitive.
https://claude.ai/code/session_01Gn6ectQLY8ec7UwMP1xk6V