feat(labels): add label_list + issue_label tools (#52)
Closes #52 — unblocks parallax#3 dispatch labeling, which needs to both discover a repo's label set and attach labels to an issue by name (the CAD pipeline doesn't track Gitea's internal numeric label IDs). - gitea.Client: ListLabels, AddIssueLabels (additive POST, matches Gitea's own semantics — no delete-then-post needed); extend the existing Label struct with Color for label_list's output. - tools.LabelList (read-only, allowlisted): lists a repo's labels. - tools.IssueLabel (allowlisted): resolves label names to IDs via ListLabels, so callers pass names (the primary interface) instead of hunting for numeric IDs; also accepts label_ids for callers that already have them. An unknown name fails closed, naming exactly which label wasn't found. - Bump TestRegisteredToolCount 39 -> 41 in the same commit (this project was bitten today by a locked count going stale silently). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,8 @@ func RegisterAll(
|
||||
reg.Register(NewIssueListComments(c, a))
|
||||
reg.Register(NewIssueClose(c, a))
|
||||
reg.Register(NewIssueReopen(c, a))
|
||||
reg.Register(NewLabelList(c, a))
|
||||
reg.Register(NewIssueLabel(c, a))
|
||||
reg.Register(NewWorkflowRunList(c, a))
|
||||
reg.Register(NewReleaseCreate(c, a))
|
||||
reg.Register(NewRepoDelete(c, a))
|
||||
|
||||
Reference in New Issue
Block a user