feat(gitea): add organization-level label creation

- Add create_org_label() method to gitea_client.py for org-level labels
- Add create_label_smart() to labels.py that auto-detects correct level
- Register both tools in server.py
- Update labels-sync.md to use create_label_smart

Label level detection:
- Organization: Type/*, Priority/*, Complexity/*, Effort/*, Risk/*, Source/*, Agent/*
- Repository: Component/*, Tech/*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 12:15:14 -05:00
parent bc136fab7e
commit b017db83a1
4 changed files with 179 additions and 4 deletions

View File

@@ -62,12 +62,20 @@ Verify these required label categories exist:
### Step 6: Create Missing Labels (if any)
For each missing required label, call:
Use `create_label_smart` which automatically creates labels at the correct level:
- **Organization level**: Type/*, Priority/*, Complexity/*, Effort/*, Risk/*, Source/*, Agent/*
- **Repository level**: Component/*, Tech/*
```
mcp__plugin_projman_gitea__create_label(repo=REPO_NAME, name="Type: Bug", color="d73a4a")
mcp__plugin_projman_gitea__create_label_smart(repo=REPO_NAME, name="Type/Bug", color="d73a4a")
```
This automatically detects whether to create at org or repo level based on the category.
**Alternative (explicit control):**
- Org labels: `create_org_label(org="org-name", name="Type/Bug", color="d73a4a")`
- Repo labels: `create_label(repo=REPO_NAME, name="Component/Backend", color="5319e7")`
Use the label format that matches existing labels in the repo (slash `/` or colon-space `: `).
### Step 7: Report Results