feat(tags): typed issue tag surface #145
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/YT-90-issue-tags"
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?
Tags were the one issue attribute with no typed code path. Both
yt issue tag addandremovewere thin wrappers over the command language (tag <name>/remove tag <name>), so a write took a name and never an id, a typo silently created a new instance-wide tag that the CLI has no way to delete, and there was no read path at all:inspect_issuenever selectedtags, so neitheryt issue inspectnor the MCPget_issuecould report what an issue carried, and nothing could enumerate the tags that exist.youtrack_client::apinow owns the surface:list_tagsandlist_issue_tagsread/api/tagsand/api/issues/<id>/tagsthroughfetch_all_pages,create_tagposts/api/tags, and the write is split from its resolution the wayproject createandproject fields addare:plan_add_issue_tagreturns anAddTagPlancarrying the resolved tag id and the byte-exact body thatadd_issue_tagposts. A name matching several visible tags is refused naming every candidate id; a name matching nothing is refused with the near matches unless a create was authorized.remove_issue_tagsendsDELETE /api/issues/<id>/tags/<tagId>and re-reads the issue's tags afterwards, so a delete the server accepted and then ignored is reported rather than confirmed; the docs page for that sub-resource 404s, so its inferred shape is recorded in a comment next to the function the way thevcsIntegrationSettingsfunctions record theirs.inspect_issueselectstags(id,name), which is what makes every write verifiable.The CLI gains
yt tag list(instance-wide) andyt issue tag list <ISSUE_ID>, both with--jsonand both paging fully, andissue tag add|removeare re-pointed onto the typed functions with--dry-runprinting the endpoint, the byte-exact payload, and a separateresolvedblock. The MCP mirrors it aslist_tags/list_issue_tags/add_issue_tag/remove_issue_tag, one verb per tool, with the two writes gated bydry_runthroughdispatchand the two reads rejecting it.Breaking change:
yt issue tag addno longer creates a tag that does not exist.--create(MCP:create: true) is the opt-in, andadd_issue_tag's tool description says so, so a model calling it does not repeat the footgun.#YT-90