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

CLI: Add functionality to operate on Workspace Membership #548

Closed
rajdip-b opened this issue Nov 22, 2024 · 2 comments · Fixed by #589
Closed

CLI: Add functionality to operate on Workspace Membership #548

rajdip-b opened this issue Nov 22, 2024 · 2 comments · Fixed by #589
Assignees
Labels
difficulty: 4 help wanted Extra attention is needed priority: high scope: cli Everything related to the CLI type: feature Release drafter tag for tagging PRs related to adding new features

Comments

@rajdip-b
Copy link
Member

Description

We would like to perform the following operations for workspace membership using our CLI:

  • Transfer the ownership of the workspace to another user (keyshade workspace membership transfer-ownership <workspace-slug> <new-owner-email>)
  • Invite a user to a workspace (keyshade workspace membership invite <workspace-slug> <invitee-email> <space separated role slugs>)
  • Remove a user from a workspace (keyshade workspace membership remove <workspace-slug> <user-email>)
  • Update the role of a specific member (keyshade workspace membership update-role <workspace-slug> <user-emails> <space separated role slugs>)
  • Accept invitation (keyshade workspace membership accept-invitation <workspace-slug>)
  • Decline invitation (keyshade workspace membership decline-invitation <workspace-slug>)
  • Cancel invitation sent to a user (keyshade workspace membership cancel-invitation <workspace-slug> <invitee-email>)
  • Leave workspace (keyshade workspace membership leave <workspace-slug>)
  • Get all members of a workspace (keyshade workspace membership list <workspace-slug>)

Solution

  • Create a new file named membership.workspace.ts under apps/cli/src/workspace
  • Create an implementation of command.interface.ts and name it WorkspaceMembershipCommand
  • Add this command in the command list of workspace.command.ts
  • Stash all the functions in src/commands/workspace/membership.
  • Use the workspaceMembershipController under ControllerInstance to make the API calls.
  • Use the controller in here to make the API calls.
@rajdip-b rajdip-b added help wanted Extra attention is needed type: feature Release drafter tag for tagging PRs related to adding new features priority: high difficulty: 4 scope: cli Everything related to the CLI labels Nov 22, 2024
@muntaxir4
Copy link
Contributor

/attempt

Copy link

github-actions bot commented Dec 9, 2024

Assigned the issue to @muntaxir4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 4 help wanted Extra attention is needed priority: high scope: cli Everything related to the CLI type: feature Release drafter tag for tagging PRs related to adding new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants