feat: add related issues tools - #168
Merged
Merged
Conversation
Adds three tools to the `issue` toolset, backed by the related issues endpoints that shipped in backlog-js 0.19.0: - get_related_issues - add_related_issue - remove_related_issue The API only supports the single undirected relation type today, so the tools take no relation-type argument; `RelatedIssueSchema` is an issue plus the `type` field the API returns. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds tools for the related issues API to the
issuetoolset, backed by the client methods that shipped in backlog-js v0.19.0 (nulab/backlog-js#181).get_related_issuesGET /api/v2/issues/:issueIdOrKey/relatedIssuesadd_related_issuePOST /api/v2/issues/:issueIdOrKey/relatedIssuesremove_related_issueDELETE /api/v2/issues/:issueIdOrKey/relatedIssues/:relatedIssueIdbacklog-jsto^0.19.0.RelatedIssueSchema— an issue plus thetypefield the API returns alongside it.issueId/issueKeythrough the existingresolveIdOrKeyhelper, consistent with the other issue tools.Scope
The API currently supports only a single, undirected relation type, so the tools intentionally expose no relation-type argument and
RelatedIssueSchema.typeis a plain string rather than an enum. This keeps the tool surface to what the API actually supports today, so nothing has to change here when the relation model is extended.add_related_issuetakes a numerictargetIssueIdbecause that is what the endpoint accepts. Resolving a target issue key to an ID would need an extragetIssuecall, so it is left out for now and can be added if it turns out agents need it.Verification
issueKey/issueIdpass-through, and the error when neither is given.typecheck,typecheck:all,lintandformatare clean.type: "RELATES"and thatremove_related_issue/add_related_issueround-trip correctly.🤖 Generated with Claude Code