Skip to content

feat: add org management#2

Open
loadez wants to merge 1 commit into
mainfrom
feat/org-management
Open

feat: add org management#2
loadez wants to merge 1 commit into
mainfrom
feat/org-management

Conversation

@loadez

@loadez loadez commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Org management

This pr adds commands to manage people on organizations and projects, it also enables the use of service accounts.

@loadez loadez requested a review from Copilot May 15, 2026 10:32
@loadez loadez self-assigned this May 15, 2026
@loadez loadez requested a review from skipi May 15, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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, and project member operations.
  • Implemented role assignment/retraction flows at org and project scopes via new endpoints.
  • Extended the API client with DeletePath to 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.

Comment thread pkg/client/client.go
}

// DeletePath sends a DELETE request to a custom path under /api/{version}/.
func (c *Client) DeletePath(path string) (*Response, error) {
Comment thread pkg/client/client.go
}

// DeletePath sends a DELETE request to a custom path under /api/{version}/.
func (c *Client) DeletePath(path string) (*Response, error) {
Comment thread cmd/service_account.go
Comment on lines +36 to +39
var result any
json.Unmarshal(resp.Body, &result)
output.Result(result)
return nil
Comment thread cmd/project_member.go
Comment on lines +43 to +46
var result any
json.Unmarshal(resp.Body, &result)
output.Result(result)
return nil
Comment thread cmd/permission.go
return fmt.Errorf("API returned %d", resp.StatusCode)
}
var result any
json.Unmarshal(resp.Body, &result)
Comment thread cmd/org.go
Comment on lines +42 to +45
var result any
json.Unmarshal(resp.Body, &result)
output.Result(result)
return nil
Comment thread cmd/group.go
Comment on lines +36 to +39
var result any
json.Unmarshal(resp.Body, &result)
output.Result(result)
return nil
@loadez loadez marked this pull request as draft May 22, 2026 15:31
@loadez loadez marked this pull request as ready for review May 25, 2026 08:53
@loadez loadez force-pushed the feat/org-management branch from 408c9a8 to 2c31ecd Compare June 8, 2026 13:32
@loadez loadez force-pushed the feat/org-management branch from 2c31ecd to b4a6e38 Compare June 9, 2026 10:57
@loadez loadez force-pushed the feat/org-management branch from b4a6e38 to b62b08c Compare June 10, 2026 11:15
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.

3 participants