b7bc3dccee
* Enrich issue_read get with hierarchy relationship signals The default issue_read `get` payload surfaced no hierarchy data, forcing agents to drop to raw REST (parent_issue_url) or scan sibling sub_issues to discover relationships. Enrich `get` with a layered, zero-extra-round-trip relationship signal derived from a single combined GraphQL query: - has_parent / has_children: cheap, always-emitted routing booleans (addresses Sam Morrow's #2726 review note). - parent: compact ref (number/title/state/url/repository) mirroring the existing get_parent payload keys; omitted when there is no parent. - sub_issues_summary: native subIssuesSummary counts (total/completed/ percent_completed); omitted when there are no sub-issues. The single-issue field-values GraphQL call in GetIssue is replaced by one combined query (fetchIssueReadEnrichment) returning field values + parent + subIssuesSummary, so `get` adds no round-trips. Enrichment is best-effort: a query failure still returns the base issue and never fails `get`. Parent titles are sanitized (parent may be cross-repo) and redacted under lockdown mode unless the parent content can be verified as safe; numeric/structural fields and counts stay intact. get_parent / sub_issue_write behavior is unchanged; tool descriptions clarify hierarchy is read here but written via sub_issue_write (no writable parent field). Refs github/planning-tracking#3306 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Tighten hierarchy tool wording Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Omit unverified parent under lockdown instead of redacting title Align issue_read get parent enrichment with the codebase's existing lockdown patterns: rather than introducing a third, redaction-with-sentinel behavior, omit the whole parent reference when its (possibly cross-repo) content cannot be verified safe. This mirrors how unsafe comments, sub-issues, and PR reviews are filtered out. has_parent stays true so an agent can still route to get_parent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Restore explicit issue read query matcher Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Omit hierarchy flags when enrichment fails Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address hierarchy review nits Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Roberto Nacu <kerobbi@github.com>
53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
{
|
|
"annotations": {
|
|
"idempotentHint": false,
|
|
"readOnlyHint": false,
|
|
"title": "Change sub-issue"
|
|
},
|
|
"description": "Add a sub-issue to a parent issue in a GitHub repository.",
|
|
"inputSchema": {
|
|
"properties": {
|
|
"after_id": {
|
|
"description": "The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)",
|
|
"type": "number"
|
|
},
|
|
"before_id": {
|
|
"description": "The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)",
|
|
"type": "number"
|
|
},
|
|
"issue_number": {
|
|
"description": "The number of the parent issue",
|
|
"type": "number"
|
|
},
|
|
"method": {
|
|
"description": "The action to perform on a single sub-issue\nOptions are:\n- 'add' - add a sub-issue to a parent issue in a GitHub repository.\n- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.\n- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.\nWrites issue hierarchy. To move a sub-issue to a new parent, use `add` with `replace_parent=true`; there is no writable parent field.\n",
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"description": "Repository owner",
|
|
"type": "string"
|
|
},
|
|
"replace_parent": {
|
|
"description": "When true, replaces the sub-issue's current parent issue. Use with 'add' method only.",
|
|
"type": "boolean"
|
|
},
|
|
"repo": {
|
|
"description": "Repository name",
|
|
"type": "string"
|
|
},
|
|
"sub_issue_id": {
|
|
"description": "The ID of the sub-issue to add. ID is not the same as issue number",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"method",
|
|
"owner",
|
|
"repo",
|
|
"issue_number",
|
|
"sub_issue_id"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"name": "sub_issue_write"
|
|
} |