Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hs ls command to get asset listing #309

Closed
TheWebTech opened this issue Sep 4, 2020 · 1 comment · Fixed by #354
Closed

Add hs ls command to get asset listing #309

TheWebTech opened this issue Sep 4, 2020 · 1 comment · Fixed by #354
Labels
enhancement New feature or request

Comments

@TheWebTech
Copy link
Contributor

TheWebTech commented Sep 4, 2020

To enable developers to work more and more locally without relying on the design manager as much, it would be nice to have an ls like command.

hypothetical command:

hs ls <path> --portal=<portalId>

path is optional, if left blank returns root directory.

When executed returns a list of files and folders in the specified directory.

Use cases:

  • Developers can identify the folder names/paths that they want to fetch/upload to easier without relying on the Design Manager UI.

  • Could also be used as a safe "testing" mechanism to ensure a hubspot.config.yml file is properly configured. (see Slack)

caveat there is no concept of hs cd and that may be requested after. A cd command could be confusing to work with.

@TheWebTech TheWebTech added the enhancement New feature or request label Sep 4, 2020
@miketalley
Copy link
Contributor

I think the best way to go about this would be to add a GET for /folders/by-path/{fullPath} that returns the folder and then if we have a match we can GET /folders/contents using that folder.id and list the folders and files from the response.

@miketalley miketalley linked a pull request Oct 9, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants