feat: implement organization management (create, update, hooks, labels) #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Currently only read operations are implemented for organizations. Full org management
requires creating and updating orgs, managing org-level webhooks for event routing,
and org-level labels that apply across all repositories in the org.
Endpoints to implement
/orgscreate_org/orgs/{org}update_org/orgs/{org}delete_org/orgs/{org}/hookslist_org_webhooks/orgs/{org}/hookscreate_org_webhook/orgs/{org}/hooks/{id}get_org_webhook/orgs/{org}/hooks/{id}edit_org_webhook/orgs/{org}/hooks/{id}delete_org_webhook/orgs/{org}/labelslist_org_labels/orgs/{org}/labelscreate_org_label/orgs/{org}/labels/{id}get_org_label/orgs/{org}/labels/{id}edit_org_label/orgs/{org}/labels/{id}delete_org_label/orgs/{org}/teamscreate_teamAcceptance Criteria
create_org(username, visibility, ...)—visibility:public|limited|privateupdate_orgaccepts:description,website,location,visibilitydelete_orgreturns{"success": true}on 204; docstring warns this is irreversibletype,config,events,active)name,color,description)create_teamaccepts:name,description,permission,unitsTechnical Notes
POST /orgsbody:{"username": "myorg", "visibility": "public", "description": "...", "website": "..."}{"type": "gitea", "config": {...}, "events": [...], "active": true}delete_orgrequires admin permission or org ownershippermission:none|read|write|admin|owner