add_issue_labels should accept label names, not only numeric IDs #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Symptom
mcp__forgejo_mcp__add_issue_labelsrejects names outright:So every caller that knows a label by name has to resolve it first via
list_repo_labels. That listing is paginated at 50 and sorted by name, which makes the resolve a multi-call walk — and a silent failure mode when the caller only gets one call.Why it matters
It already cost a production behaviour. The auto-issue triage stage budgeted exactly one
list_repo_labelscall, so it saw one alphabetical slice ofPhilflow/flow.ravenand could never reachtype/*; every run fell back totype/unclear(Philflow/auto-issue-orchestrator#212, fixed there by raising the budget — a workaround for this).Upstream supports names
Forgejo's
POST /repos/{owner}/{repo}/issues/{n}/labelsaccepts label names. The caveat is that it silently drops names that do not exist on the repo — which is why callers pre-create (seeflow.raven-deployment/apps/forgejo-alert-bridge/src/bridge/forgejo.py,attach_labels, documented from live verification on 2026-05-23). Note the neighbouring quirk:POST /issueswithlabels: ["name"]does 422 and wants IDs, so the two endpoints genuinely differ.Proposed
Accept both in
labels: pass numeric entries through as IDs, forward non-numeric entries as names. Because unknown names are dropped silently by the server, the tool should read back the issue's labels after the write and report any requested name that did not stick, rather than returning success.Acceptance criteria
labels="type/infra"attaches the label.labels="123"still works.list_repo_labelsresolve step.🤖 Generated with Claude Code