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

Show organization name in infisical init command #1521

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

rhythmbhiwani
Copy link
Contributor

Description 📣

Closes #1339 . Right now when running infisical init command, it only gives list of project names. So if you have multiple projects in different organizations with same name, it would be confusing to select the right project.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Tests 🛠️

Previously:

init-old.mov

After Update:

show-organization-name-in-init.mov
go run main.go init

cli/packages/api/api.go Outdated Show resolved Hide resolved
…ame` and `displayName` in result

Updated the CLI to use this new paramter to display organization name with project name with support for backward compatibility keeping original behaviour for older apis
@rhythmbhiwani
Copy link
Contributor Author

@maidul98 Updated the logic to backend with a query param populateOrgName to the /v1/workspace api, which adds orgName and displayName property. Attached is a reference api response
Screenshot 2024-03-03 at 11 36 35 AM

Also updated the cli to use these values, but keep original behaviour for older apis for backward compatibility

In CLI, now first asking org, then projects
@rhythmbhiwani
Copy link
Contributor Author

Screen.Recording.2024-03-05.at.3.06.36.AM.mov

@maidul98 Here's the new demo

cli/packages/util/init.go Outdated Show resolved Hide resolved
cli/packages/cmd/init.go Outdated Show resolved Hide resolved
cli/packages/api/api.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@maidul98 maidul98 merged commit 7987a1e into Infisical:main Mar 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Including Org name in cli usage of infisical init
2 participants