Skip to content

Commit 3ba8d4a

Browse files
authored
Issues consolidation (#1211)
* Issues consolidation * Issues consolidation * Clarify get_review_comments description * Add get_comments method * Formatting fixes * Clarify tool description * Clarify tool descriptions
1 parent f51bd45 commit 3ba8d4a

18 files changed

+969
-1183
lines changed

README.md

Lines changed: 44 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -635,44 +635,48 @@ The following sets of tools are available:
635635
- `owner`: Repository owner (string, required)
636636
- `repo`: Repository name (string, required)
637637

638-
- **add_sub_issue** - Add sub-issue
639-
- `issue_number`: The number of the parent issue (number, required)
640-
- `owner`: Repository owner (string, required)
641-
- `replace_parent`: When true, replaces the sub-issue's current parent issue (boolean, optional)
642-
- `repo`: Repository name (string, required)
643-
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
644-
645638
- **assign_copilot_to_issue** - Assign Copilot to issue
646639
- `issueNumber`: Issue number (number, required)
647640
- `owner`: Repository owner (string, required)
648641
- `repo`: Repository name (string, required)
649642

650-
- **create_issue** - Open new issue
651-
- `assignees`: Usernames to assign to this issue (string[], optional)
652-
- `body`: Issue body content (string, optional)
653-
- `labels`: Labels to apply to this issue (string[], optional)
654-
- `milestone`: Milestone number (number, optional)
655-
- `owner`: Repository owner (string, required)
643+
- **get_label** - Get a specific label from a repository.
644+
- `name`: Label name. (string, required)
645+
- `owner`: Repository owner (username or organization name) (string, required)
656646
- `repo`: Repository name (string, required)
657-
- `title`: Issue title (string, required)
658-
- `type`: Type of this issue (string, optional)
659647

660-
- **get_issue** - Get issue details
648+
- **issue_read** - Get issue details
661649
- `issue_number`: The number of the issue (number, required)
650+
- `method`: The read operation to perform on a single issue.
651+
Options are:
652+
1. get - Get details of a specific issue.
653+
2. get_comments - Get issue comments.
654+
3. get_sub_issues - Get sub-issues of the issue.
655+
4. get_labels - Get labels assigned to the issue.
656+
(string, required)
662657
- `owner`: The owner of the repository (string, required)
663-
- `repo`: The name of the repository (string, required)
664-
665-
- **get_issue_comments** - Get issue comments
666-
- `issue_number`: Issue number (number, required)
667-
- `owner`: Repository owner (string, required)
668658
- `page`: Page number for pagination (min 1) (number, optional)
669659
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
670-
- `repo`: Repository name (string, required)
660+
- `repo`: The name of the repository (string, required)
671661

672-
- **get_label** - Get a specific label from a repository.
673-
- `name`: Label name. (string, required)
674-
- `owner`: Repository owner (username or organization name) (string, required)
662+
- **issue_write** - Create or update issue.
663+
- `assignees`: Usernames to assign to this issue (string[], optional)
664+
- `body`: Issue body content (string, optional)
665+
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
666+
- `issue_number`: Issue number to update (number, optional)
667+
- `labels`: Labels to apply to this issue (string[], optional)
668+
- `method`: Write operation to perform on a single issue.
669+
Options are:
670+
- 'create' - creates a new issue.
671+
- 'update' - updates an existing issue.
672+
(string, required)
673+
- `milestone`: Milestone number (number, optional)
674+
- `owner`: Repository owner (string, required)
675675
- `repo`: Repository name (string, required)
676+
- `state`: New state (string, optional)
677+
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
678+
- `title`: Issue title (string, optional)
679+
- `type`: Type of this issue (string, optional)
676680

677681
- **list_issue_types** - List available issue types
678682
- `owner`: The organization owner of the repository (string, required)
@@ -688,32 +692,6 @@ The following sets of tools are available:
688692
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
689693
- `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
690694

691-
- **list_label** - List labels from a repository or an issue
692-
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
693-
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
694-
- `repo`: Repository name - required for all operations (string, required)
695-
696-
- **list_sub_issues** - List sub-issues
697-
- `issue_number`: Issue number (number, required)
698-
- `owner`: Repository owner (string, required)
699-
- `page`: Page number for pagination (default: 1) (number, optional)
700-
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
701-
- `repo`: Repository name (string, required)
702-
703-
- **remove_sub_issue** - Remove sub-issue
704-
- `issue_number`: The number of the parent issue (number, required)
705-
- `owner`: Repository owner (string, required)
706-
- `repo`: Repository name (string, required)
707-
- `sub_issue_id`: The ID of the sub-issue to remove. ID is not the same as issue number (number, required)
708-
709-
- **reprioritize_sub_issue** - Reprioritize sub-issue
710-
- `after_id`: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
711-
- `before_id`: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)
712-
- `issue_number`: The number of the parent issue (number, required)
713-
- `owner`: Repository owner (string, required)
714-
- `repo`: Repository name (string, required)
715-
- `sub_issue_id`: The ID of the sub-issue to reprioritize. ID is not the same as issue number (number, required)
716-
717695
- **search_issues** - Search issues
718696
- `order`: Sort order (string, optional)
719697
- `owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
@@ -723,19 +701,20 @@ The following sets of tools are available:
723701
- `repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
724702
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
725703

726-
- **update_issue** - Edit issue
727-
- `assignees`: New assignees (string[], optional)
728-
- `body`: New description (string, optional)
729-
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
730-
- `issue_number`: Issue number to update (number, required)
731-
- `labels`: New labels (string[], optional)
732-
- `milestone`: New milestone number (number, optional)
704+
- **sub_issue_write** - Change sub-issue
705+
- `after_id`: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
706+
- `before_id`: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)
707+
- `issue_number`: The number of the parent issue (number, required)
708+
- `method`: The action to perform on a single sub-issue
709+
Options are:
710+
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
711+
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
712+
- '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.
713+
(string, required)
733714
- `owner`: Repository owner (string, required)
715+
- `replace_parent`: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)
734716
- `repo`: Repository name (string, required)
735-
- `state`: New state (string, optional)
736-
- `state_reason`: Reason for the state change. Ignored unless state is changed. (string, optional)
737-
- `title`: New title (string, optional)
738-
- `type`: New issue type (string, optional)
717+
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
739718

740719
</details>
741720

@@ -757,8 +736,7 @@ The following sets of tools are available:
757736
- `owner`: Repository owner (username or organization name) (string, required)
758737
- `repo`: Repository name (string, required)
759738

760-
- **list_label** - List labels from a repository or an issue
761-
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
739+
- **list_label** - List labels from a repository
762740
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
763741
- `repo`: Repository name - required for all operations (string, required)
764742

@@ -927,8 +905,9 @@ Possible options:
927905
2. get_diff - Get the diff of a pull request.
928906
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
929907
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
930-
5. get_review_comments - Get the review comments on a pull request. Use with pagination parameters to control the number of results returned.
908+
5. get_review_comments - Get the review comments on a pull request. They are comments made on a portion of the unified diff during a pull request review. Use with pagination parameters to control the number of results returned.
931909
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
910+
7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.
932911
(string, required)
933912
- `owner`: Repository owner (string, required)
934913
- `page`: Page number for pagination (min 1) (number, optional)

pkg/github/__toolsnaps__/add_issue_comment.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Add comment to issue",
44
"readOnlyHint": false
55
},
6-
"description": "Add a comment to a specific issue in a GitHub repository.",
6+
"description": "Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.",
77
"inputSchema": {
88
"properties": {
99
"body": {

pkg/github/__toolsnaps__/add_sub_issue.snap

Lines changed: 0 additions & 39 deletions
This file was deleted.

pkg/github/__toolsnaps__/get_issue.snap

Lines changed: 0 additions & 30 deletions
This file was deleted.

pkg/github/__toolsnaps__/get_issue_comments.snap

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"annotations": {
3+
"title": "Get issue details",
4+
"readOnlyHint": true
5+
},
6+
"description": "Get information about a specific issue in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"issue_number": {
10+
"description": "The number of the issue",
11+
"type": "number"
12+
},
13+
"method": {
14+
"description": "The read operation to perform on a single issue. \nOptions are: \n1. get - Get details of a specific issue.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues of the issue.\n4. get_labels - Get labels assigned to the issue.\n",
15+
"enum": [
16+
"get",
17+
"get_comments",
18+
"get_sub_issues",
19+
"get_labels"
20+
],
21+
"type": "string"
22+
},
23+
"owner": {
24+
"description": "The owner of the repository",
25+
"type": "string"
26+
},
27+
"page": {
28+
"description": "Page number for pagination (min 1)",
29+
"minimum": 1,
30+
"type": "number"
31+
},
32+
"perPage": {
33+
"description": "Results per page for pagination (min 1, max 100)",
34+
"maximum": 100,
35+
"minimum": 1,
36+
"type": "number"
37+
},
38+
"repo": {
39+
"description": "The name of the repository",
40+
"type": "string"
41+
}
42+
},
43+
"required": [
44+
"method",
45+
"owner",
46+
"repo",
47+
"issue_number"
48+
],
49+
"type": "object"
50+
},
51+
"name": "issue_read"
52+
}

0 commit comments

Comments
 (0)