Skip to content

Commit b5188c7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/git-blame-tool
# Conflicts: # pkg/github/repositories.go # pkg/github/repositories_test.go
2 parents ceff0c9 + 8a48d07 commit b5188c7

11 files changed

Lines changed: 1817 additions & 39 deletions

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,23 @@ The following sets of tools are available:
730730

731731
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/comment-discussion-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/comment-discussion-light.png"><img src="pkg/octicons/icons/comment-discussion-light.png" width="20" height="20" alt="comment-discussion"></picture> Discussions</summary>
732732

733+
- **discussion_comment_write** - Manage discussion comments
734+
- **Required OAuth Scopes**: `repo`
735+
- `body`: Comment content (required for 'add', 'reply', and 'update' methods) (string, optional)
736+
- `commentNodeID`: The Node ID of the discussion comment (required for 'reply', 'update', 'delete', 'mark_answer', and 'unmark_answer' methods). For 'reply', this is the top-level comment to reply to; GitHub Discussions only support one level of nesting. (string, optional)
737+
- `discussionNumber`: Discussion number (required for 'add' and 'reply' methods) (number, optional)
738+
- `method`: Write operation to perform on a discussion comment.
739+
Options are:
740+
- 'add' - adds a new top-level comment to a discussion.
741+
- 'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).
742+
- 'update' - updates an existing discussion comment.
743+
- 'delete' - deletes a discussion comment.
744+
- 'mark_answer' - marks a discussion comment as the answer (Q&A only).
745+
- 'unmark_answer' - unmarks a discussion comment as the answer (Q&A only).
746+
(string, required)
747+
- `owner`: Repository owner (required for 'add' and 'reply' methods) (string, optional)
748+
- `repo`: Repository name (required for 'add' and 'reply' methods) (string, optional)
749+
733750
- **get_discussion** - Get discussion
734751
- **Required OAuth Scopes**: `repo`
735752
- `discussionNumber`: Discussion Number (number, required)
@@ -740,6 +757,7 @@ The following sets of tools are available:
740757
- **Required OAuth Scopes**: `repo`
741758
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
742759
- `discussionNumber`: Discussion Number (number, required)
760+
- `includeReplies`: When true, each top-level comment will include its replies nested within it (up to 100 replies per comment, which is the GitHub API maximum). Defaults to false. (boolean, optional)
743761
- `owner`: Repository owner (string, required)
744762
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
745763
- `repo`: Repository name (string, required)
@@ -1267,6 +1285,14 @@ The following sets of tools are available:
12671285
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
12681286
- `repo`: Repository name (string, required)
12691287

1288+
- **list_repository_collaborators** - List repository collaborators
1289+
- **Required OAuth Scopes**: `repo`
1290+
- `affiliation`: Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all' (string, optional)
1291+
- `owner`: Repository owner (string, required)
1292+
- `page`: Page number for pagination (default 1, min 1) (number, optional)
1293+
- `perPage`: Results per page for pagination (default 30, min 1, max 100) (number, optional)
1294+
- `repo`: Repository name (string, required)
1295+
12701296
- **list_tags** - List tags
12711297
- **Required OAuth Scopes**: `repo`
12721298
- `owner`: Repository owner (string, required)
@@ -1424,6 +1450,11 @@ The following sets of tools are available:
14241450

14251451
<summary>Copilot Spaces</summary>
14261452

1453+
- **Authentication note**
1454+
- Fine-grained PATs are not hidden by classic PAT scope filtering, so these tools may still appear even when the token cannot use them.
1455+
- For org-owned spaces, fine-grained PATs must be installed on the owning organization and include `organization_copilot_spaces: read`.
1456+
- If an org-owned space contains repository-backed resources, the token must also have access to every referenced repository or the space may be treated as not found.
1457+
14271458
- **get_copilot_space** - Get Copilot Space
14281459
- `owner`: The owner of the space. (string, required)
14291460
- `name`: The name of the space. (string, required)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"annotations": {
3+
"destructiveHint": true,
4+
"title": "Manage discussion comments"
5+
},
6+
"description": "Write operations for discussion comments.\nSupports adding top-level comments, replying to existing comments, updating comment content, deleting comments, and marking or unmarking comments as the answer.",
7+
"inputSchema": {
8+
"properties": {
9+
"body": {
10+
"description": "Comment content (required for 'add', 'reply', and 'update' methods)",
11+
"type": "string"
12+
},
13+
"commentNodeID": {
14+
"description": "The Node ID of the discussion comment (required for 'reply', 'update', 'delete', 'mark_answer', and 'unmark_answer' methods). For 'reply', this is the top-level comment to reply to; GitHub Discussions only support one level of nesting.",
15+
"type": "string"
16+
},
17+
"discussionNumber": {
18+
"description": "Discussion number (required for 'add' and 'reply' methods)",
19+
"type": "number"
20+
},
21+
"method": {
22+
"description": "Write operation to perform on a discussion comment.\nOptions are:\n- 'add' - adds a new top-level comment to a discussion.\n- 'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).\n- 'update' - updates an existing discussion comment.\n- 'delete' - deletes a discussion comment.\n- 'mark_answer' - marks a discussion comment as the answer (Q\u0026A only).\n- 'unmark_answer' - unmarks a discussion comment as the answer (Q\u0026A only).\n",
23+
"enum": [
24+
"add",
25+
"reply",
26+
"update",
27+
"delete",
28+
"mark_answer",
29+
"unmark_answer"
30+
],
31+
"type": "string"
32+
},
33+
"owner": {
34+
"description": "Repository owner (required for 'add' and 'reply' methods)",
35+
"type": "string"
36+
},
37+
"repo": {
38+
"description": "Repository name (required for 'add' and 'reply' methods)",
39+
"type": "string"
40+
}
41+
},
42+
"required": [
43+
"method"
44+
],
45+
"type": "object"
46+
},
47+
"name": "discussion_comment_write"
48+
}

pkg/github/__toolsnaps__/get_discussion_comments.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"description": "Discussion Number",
1515
"type": "number"
1616
},
17+
"includeReplies": {
18+
"description": "When true, each top-level comment will include its replies nested within it (up to 100 replies per comment, which is the GitHub API maximum). Defaults to false.",
19+
"type": "boolean"
20+
},
1721
"owner": {
1822
"description": "Repository owner",
1923
"type": "string"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List repository collaborators"
5+
},
6+
"description": "List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.",
7+
"inputSchema": {
8+
"properties": {
9+
"affiliation": {
10+
"description": "Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all'",
11+
"enum": [
12+
"outside",
13+
"direct",
14+
"all"
15+
],
16+
"type": "string"
17+
},
18+
"owner": {
19+
"description": "Repository owner",
20+
"type": "string"
21+
},
22+
"page": {
23+
"description": "Page number for pagination (default 1, min 1)",
24+
"minimum": 1,
25+
"type": "number"
26+
},
27+
"perPage": {
28+
"description": "Results per page for pagination (default 30, min 1, max 100)",
29+
"maximum": 100,
30+
"minimum": 1,
31+
"type": "number"
32+
},
33+
"repo": {
34+
"description": "Repository name",
35+
"type": "string"
36+
}
37+
},
38+
"required": [
39+
"owner",
40+
"repo"
41+
],
42+
"type": "object"
43+
},
44+
"name": "list_repository_collaborators"
45+
}

0 commit comments

Comments
 (0)