fix: preserve path separators in create command argument#526
Open
fix: preserve path separators in create command argument#526
Conversation
The display_information.name and bot_user.display_name fields in manifest files were set to the kebab-case directory name (e.g. "my-app") instead of a human-readable title case name (e.g. "My App").
…ebab Addresses review feedback — instead of converting the kebab-case directory name to title case (which mangles names like "TIM" or "Translator - Translate Languages"), pass the original user-provided app name through to manifest display fields. This preserves the user's exact casing and formatting.
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
The getAppDirName function was normalizing the entire input including path separators, so `slack create path/to/my-app` produced a flat directory `path-to-my-app` instead of preserving the path structure. Adds parseAppPath which splits user input into path prefix and basename, only kebab-casing the basename. The display name for manifests is derived from the raw basename (preserving original casing). Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #526 +/- ##
==========================================
+ Coverage 71.28% 71.31% +0.02%
==========================================
Files 222 222
Lines 18698 18711 +13
==========================================
+ Hits 13329 13343 +14
Misses 4188 4188
+ Partials 1181 1180 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
slack create path/to/my-appregression where path separators were being replaced with dashes, creating a flatpath-to-my-appdirectory instead of preserving thepath/to/my-appstructureparseAppPathhelper that splits user input into path prefix + basename, only kebab-casing the basenameBehavior
Stacks on #521 which handles the display name vs dir name separation.
Test plan
TestParseAppPath— 12 cases covering simple names, paths, absolute paths, dot-prefixed, trailing slashes, and error casesTestGetProjectDirectoryNamestill passes (single-component names)go test ./...) passesslack create path/to/my-appwith existingpath/to/directory → verify nested structure created and manifest hasmy-appslack create "My App"→ verify dir ismy-app, manifest display isMy App