Skip to content

Commit d29f8c9

Browse files
authored
Merge branch 'main' into feature/github-packages-support
2 parents 4004d2a + 5e5e80a commit d29f8c9

27 files changed

+1392
-1291
lines changed

.github/workflows/moderator.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: AI Moderator
2+
on:
3+
issues:
4+
types: [opened]
5+
issue_comment:
6+
types: [created]
7+
pull_request_review_comment:
8+
types: [created]
9+
10+
jobs:
11+
spam-detection:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
models: read
17+
contents: read
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: github/ai-moderator@v1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
spam-label: 'spam'
24+
ai-label: 'ai-generated'
25+
minimize-detected-comments: true
26+
enable-spam-detection: true
27+
enable-link-spam-detection: true
28+
enable-ai-detection: true

README.md

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

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

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

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

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

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

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

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

741720
</details>
742721

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

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

@@ -902,6 +880,7 @@ The following sets of tools are available:
902880
- `project_number`: The project's number. (number, required)
903881

904882
- **get_project_item** - Get project item
883+
- `fields`: Specific list of field IDs to include in the response (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. (string[], optional)
905884
- `item_id`: The item's ID. (number, required)
906885
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
907886
- `owner_type`: Owner type (string, required)
@@ -914,6 +893,7 @@ The following sets of tools are available:
914893
- `project_number`: The project's number. (number, required)
915894

916895
- **list_project_items** - List project items
896+
- `fields`: Specific list of field IDs to include in the response (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. (string[], optional)
917897
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
918898
- `owner_type`: Owner type (string, required)
919899
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
@@ -931,7 +911,7 @@ The following sets of tools are available:
931911
- `owner`: If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive. (string, required)
932912
- `owner_type`: Owner type (string, required)
933913
- `project_number`: The project's number. (number, required)
934-
- `updated_field`: Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set "value" to null. Example: {"id": 123456, "value": "New Value"} (object, required)
914+
- `updated_field`: Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {"id": 123456, "value": "New Value"} (object, required)
935915

936916
</details>
937917

@@ -987,8 +967,9 @@ Possible options:
987967
2. get_diff - Get the diff of a pull request.
988968
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
989969
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
990-
5. get_review_comments - Get the review comments on a pull request. Use with pagination parameters to control the number of results returned.
970+
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.
991971
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
972+
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.
992973
(string, required)
993974
- `owner`: Repository owner (string, required)
994975
- `page`: Page number for pagination (min 1) (number, optional)

docs/remote-server.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,16 @@ Example:
7777

7878
### URL Path Parameters
7979

80-
The Remote GitHub MCP server also supports the URL path parameters:
80+
The Remote GitHub MCP server supports the following URL path patterns:
8181

82-
- `/x/{toolset}`
83-
- `/x/{toolset}/readonly`
84-
- `/readonly`
82+
- `/` - Default toolset (see ["default" toolset](../README.md#default-toolset))
83+
- `/readonly` - Default toolset in read-only mode
84+
- `/x/all` - All available toolsets
85+
- `/x/all/readonly` - All available toolsets in read-only mode
86+
- `/x/{toolset}` - Single specific toolset
87+
- `/x/{toolset}/readonly` - Single specific toolset in read-only mode
8588

86-
Note: `{toolset}` can only been a single toolset, not a comma-separated list. To combine multiple toolsets, use the `X-MCP-Toolsets` header instead.
89+
Note: `{toolset}` can only be a single toolset, not a comma-separated list. To combine multiple toolsets, use the `X-MCP-Toolsets` header instead.
8790

8891
Example:
8992

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.

pkg/github/__toolsnaps__/get_project_item.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"description": "Get a specific Project item for a user or org",
77
"inputSchema": {
88
"properties": {
9+
"fields": {
10+
"description": "Specific list of field IDs to include in the response (e.g. [\"102589\", \"985201\", \"169875\"]). If not provided, only the title field is included.",
11+
"items": {
12+
"type": "string"
13+
},
14+
"type": "array"
15+
},
916
"item_id": {
1017
"description": "The item's ID.",
1118
"type": "number"

0 commit comments

Comments
 (0)