feat: add org management#2
Open
loadez wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the sem-ai CLI with organization-management capabilities (org members/roles, groups, service accounts, permissions, and project-member role operations) and adds a client helper to support DELETE calls to custom API paths.
Changes:
- Added new Cobra command trees for
org,group,service-account,permission, andproject memberoperations. - Implemented role assignment/retraction flows at org and project scopes via new endpoints.
- Extended the API client with
DeletePathto DELETE arbitrary resource paths under/api/{version}/.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/client/client.go | Adds Client.DeletePath for DELETE requests to custom API paths. |
| cmd/service_account.go | Introduces service-account commands (list/create/show/update/delete/deactivate/reactivate/regenerate-token). |
| cmd/project_member.go | Adds project member commands for listing members and assigning/retracting project roles. |
| cmd/permission.go | Adds permission list with optional --scope filtering. |
| cmd/org.go | Introduces org member and org role command groups, including custom role CRUD and member role assignment/retraction. |
| cmd/group.go | Adds group management commands (list/create/update/delete). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| // DeletePath sends a DELETE request to a custom path under /api/{version}/. | ||
| func (c *Client) DeletePath(path string) (*Response, error) { |
| } | ||
|
|
||
| // DeletePath sends a DELETE request to a custom path under /api/{version}/. | ||
| func (c *Client) DeletePath(path string) (*Response, error) { |
Comment on lines
+36
to
+39
| var result any | ||
| json.Unmarshal(resp.Body, &result) | ||
| output.Result(result) | ||
| return nil |
Comment on lines
+43
to
+46
| var result any | ||
| json.Unmarshal(resp.Body, &result) | ||
| output.Result(result) | ||
| return nil |
| return fmt.Errorf("API returned %d", resp.StatusCode) | ||
| } | ||
| var result any | ||
| json.Unmarshal(resp.Body, &result) |
Comment on lines
+42
to
+45
| var result any | ||
| json.Unmarshal(resp.Body, &result) | ||
| output.Result(result) | ||
| return nil |
Comment on lines
+36
to
+39
| var result any | ||
| json.Unmarshal(resp.Body, &result) | ||
| output.Result(result) | ||
| return nil |
skipi
approved these changes
May 15, 2026
408c9a8 to
2c31ecd
Compare
2c31ecd to
b4a6e38
Compare
b4a6e38 to
b62b08c
Compare
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.
Org management
This pr adds commands to manage people on organizations and projects, it also enables the use of service accounts.