Skip to content

Commit ef3362d

Browse files
zwickCopilot
andcommitted
Tighten hierarchy tool wording
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e01f491 commit ef3362d

4 files changed

Lines changed: 18 additions & 20 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ The following sets of tools are available:
857857
- `issue_number`: The number of the issue (number, required)
858858
- `method`: The read operation to perform on a single issue.
859859
Options are:
860-
1. get - Get details of a specific issue, including hierarchy relationship signals: has_parent and has_children (booleans, always present), plus a compact parent reference (parent) and sub-issue counts (sub_issues_summary) when those relationships exist. Hierarchy is READ here (and via get_parent / get_sub_issues); there is no writable parent field. To change an issue's parent, use sub_issue_write (add with replace_parent). An issue with no parent returns has_parent:false and omits parent.
860+
1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional. No writable parent field; use `sub_issue_write`.
861861
2. get_comments - Get issue comments.
862862
3. get_sub_issues - Get sub-issues (children) of the issue.
863863
4. get_parent - Get the parent issue, if this issue is a sub-issue of another.
@@ -934,8 +934,8 @@ The following sets of tools are available:
934934
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
935935
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
936936
- '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.
937-
This tool WRITES hierarchy; the parent relationship is read back via issue_read (get returns has_parent / has_children / parent / sub_issues_summary) or issue_read get_parent. There is no writable parent field: to move an issue under a new parent, call 'add' with replace_parent=true.
938-
(string, required)
937+
Writes issue hierarchy. To move a sub-issue to a new parent, use `add` with `replace_parent=true`. Read hierarchy via `issue_read get`, `get_parent`, or `get_sub_issues`; there is no writable parent field.
938+
(string, required)
939939
- `owner`: Repository owner (string, required)
940940
- `replace_parent`: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)
941941
- `repo`: Repository name (string, required)

pkg/github/__toolsnaps__/issue_read.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"type": "number"
1212
},
1313
"method": {
14-
"description": "The read operation to perform on a single issue.\nOptions are:\n1. get - Get details of a specific issue, including hierarchy relationship signals: has_parent and has_children (booleans, always present), plus a compact parent reference (parent) and sub-issue counts (sub_issues_summary) when those relationships exist. Hierarchy is READ here (and via get_parent / get_sub_issues); there is no writable parent field. To change an issue's parent, use sub_issue_write (add with replace_parent). An issue with no parent returns has_parent:false and omits parent.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues (children) of the issue.\n4. get_parent - Get the parent issue, if this issue is a sub-issue of another.\n5. get_labels - Get labels assigned to the issue.\n",
14+
"description": "The read operation to perform on a single issue.\nOptions are:\n1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional. No writable parent field; use `sub_issue_write`.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues (children) of the issue.\n4. get_parent - Get the parent issue, if this issue is a sub-issue of another.\n5. get_labels - Get labels assigned to the issue.\n",
1515
"enum": [
1616
"get",
1717
"get_comments",

pkg/github/__toolsnaps__/sub_issue_write.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"type": "number"
1919
},
2020
"method": {
21-
"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.\nThis tool WRITES hierarchy; the parent relationship is read back via issue_read (get returns has_parent / has_children / parent / sub_issues_summary) or issue_read get_parent. There is no writable parent field: to move an issue under a new parent, call 'add' with replace_parent=true.\n\t\t\t\t",
21+
"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`. Read hierarchy via `issue_read get`, `get_parent`, or `get_sub_issues`; there is no writable parent field.\n",
2222
"type": "string"
2323
},
2424
"owner": {

pkg/github/issues.go

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -613,14 +613,13 @@ func IssueRead(t translations.TranslationHelperFunc) inventory.ServerTool {
613613
Properties: map[string]*jsonschema.Schema{
614614
"method": {
615615
Type: "string",
616-
Description: `The read operation to perform on a single issue.
617-
Options are:
618-
1. get - Get details of a specific issue, including hierarchy relationship signals: has_parent and has_children (booleans, always present), plus a compact parent reference (parent) and sub-issue counts (sub_issues_summary) when those relationships exist. Hierarchy is READ here (and via get_parent / get_sub_issues); there is no writable parent field. To change an issue's parent, use sub_issue_write (add with replace_parent). An issue with no parent returns has_parent:false and omits parent.
619-
2. get_comments - Get issue comments.
620-
3. get_sub_issues - Get sub-issues (children) of the issue.
621-
4. get_parent - Get the parent issue, if this issue is a sub-issue of another.
622-
5. get_labels - Get labels assigned to the issue.
623-
`,
616+
Description: "The read operation to perform on a single issue.\n" +
617+
"Options are:\n" +
618+
"1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are optional. No writable parent field; use `sub_issue_write`.\n" +
619+
"2. get_comments - Get issue comments.\n" +
620+
"3. get_sub_issues - Get sub-issues (children) of the issue.\n" +
621+
"4. get_parent - Get the parent issue, if this issue is a sub-issue of another.\n" +
622+
"5. get_labels - Get labels assigned to the issue.\n",
624623
Enum: []any{"get", "get_comments", "get_sub_issues", "get_parent", "get_labels"},
625624
},
626625
"owner": {
@@ -1257,13 +1256,12 @@ func SubIssueWrite(t translations.TranslationHelperFunc) inventory.ServerTool {
12571256
Properties: map[string]*jsonschema.Schema{
12581257
"method": {
12591258
Type: "string",
1260-
Description: `The action to perform on a single sub-issue
1261-
Options are:
1262-
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
1263-
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
1264-
- '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.
1265-
This tool WRITES hierarchy; the parent relationship is read back via issue_read (get returns has_parent / has_children / parent / sub_issues_summary) or issue_read get_parent. There is no writable parent field: to move an issue under a new parent, call 'add' with replace_parent=true.
1266-
`,
1259+
Description: "The action to perform on a single sub-issue\n" +
1260+
"Options are:\n" +
1261+
"- 'add' - add a sub-issue to a parent issue in a GitHub repository.\n" +
1262+
"- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.\n" +
1263+
"- '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.\n" +
1264+
"Writes issue hierarchy. To move a sub-issue to a new parent, use `add` with `replace_parent=true`. Read hierarchy via `issue_read get`, `get_parent`, or `get_sub_issues`; there is no writable parent field.\n",
12671265
},
12681266
"owner": {
12691267
Type: "string",

0 commit comments

Comments
 (0)