Skip to content

Commit c0c3e0d

Browse files
committed
redo changes
1 parent ed3f9dc commit c0c3e0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2672
-2045
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,11 @@
11
<!--
2-
Copilot: Fill all sections. Prefer short, concrete answers.
3-
If a checkbox is selected, add a brief explanation.
4-
-->
5-
6-
## Summary
7-
<!-- In 1–2 sentences: what does this PR do? -->
8-
9-
## Why
10-
<!-- Why is this change needed? Link issues or discussions. -->
11-
Fixes #
12-
13-
## What changed
14-
<!-- Bullet list of concrete changes. -->
15-
-
16-
-
17-
18-
## MCP impact
19-
<!-- Select one or more. If selected, add 1–2 sentences. -->
20-
- [ ] No tool or API changes
21-
- [ ] Tool schema or behavior changed
22-
- [ ] New tool added
2+
Thank you for contributing to GitHub MCP Server!
3+
Please reference an existing issue: `Closes #NUMBER`
234
24-
## Prompts tested (tool changes only)
25-
<!-- If you changed or added tools, list example prompts you tested. -->
26-
<!-- Include prompts that trigger the tool and describe the use case. -->
27-
<!-- Example: "List all open issues in the repo assigned to me" -->
28-
-
29-
30-
## Security / limits
31-
<!-- Select if relevant. Add a short note if checked. -->
32-
- [ ] No security or limits impact
33-
- [ ] Auth / permissions considered
34-
- [ ] Data exposure, filtering, or token/size limits considered
35-
36-
## Lint & tests
37-
<!-- Check what you ran. If not run, explain briefly. -->
38-
- [ ] Linted locally with `./script/lint`
39-
- [ ] Tested locally with `./script/test`
40-
41-
## Docs
5+
Screenshots or videos of changed behavior is incredibly helpful and always appreciated.
6+
Consider addressing the following:
7+
- Tradeoffs: List tradeoffs you made to take on or pay down tech debt.
8+
- Alternatives: Describe alternative approaches you considered and why you discarded them.
9+
-->
4210

43-
- [ ] Not needed
44-
- [ ] Updated (README / docs / examples)
11+
Closes:

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
type=raw,value=latest,enable=${{ github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') }}
8888
8989
- name: Go Build Cache for Docker
90-
uses: actions/cache@v5
90+
uses: actions/cache@v4
9191
with:
9292
path: go-build-cache
9393
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ These are one time installations required to be able to test your changes locall
3939
- Run linter: `script/lint`
4040
- Update snapshots and run tests: `UPDATE_TOOLSNAPS=true go test ./...`
4141
- Update readme documentation: `script/generate-docs`
42-
- If renaming a tool, add a deprecation alias (see [Tool Renaming Guide](docs/tool-renaming.md))
4342
6. Push to your fork and [submit a pull request][pr] targeting the `main` branch
4443
7. Pat yourself on the back and wait for your pull request to be reviewed and merged.
4544

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ The following sets of tools are available:
991991
2. get_diff - Get the diff of a pull request.
992992
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
993993
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
994-
5. get_review_comments - Get review threads on a pull request. Each thread contains logically grouped review comments made on the same code location during pull request reviews. Returns threads with metadata (isResolved, isOutdated, isCollapsed) and their associated comments. Use cursor-based pagination (perPage, after) to control results.
994+
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.
995995
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
996996
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.
997997
(string, required)
@@ -1061,7 +1061,7 @@ The following sets of tools are available:
10611061
- `owner`: Repository owner (username or organization) (string, required)
10621062
- `path`: Path where to create/update the file (string, required)
10631063
- `repo`: Repository name (string, required)
1064-
- `sha`: The blob SHA of the file being replaced. (string, optional)
1064+
- `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional)
10651065

10661066
- **create_repository** - Create repository
10671067
- `autoInit`: Initialize with README (boolean, optional)
@@ -1092,7 +1092,7 @@ The following sets of tools are available:
10921092

10931093
- **get_file_contents** - Get file or directory contents
10941094
- `owner`: Repository owner (username or organization) (string, required)
1095-
- `path`: Path to file/directory (string, optional)
1095+
- `path`: Path to file/directory (directories must end with a slash '/') (string, optional)
10961096
- `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
10971097
- `repo`: Repository name (string, required)
10981098
- `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)

cmd/github-mcp-server/generate_docs.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99

1010
"github.com/github/github-mcp-server/pkg/github"
11-
"github.com/github/github-mcp-server/pkg/inventory"
11+
"github.com/github/github-mcp-server/pkg/registry"
1212
"github.com/github/github-mcp-server/pkg/translations"
1313
"github.com/google/jsonschema-go/jsonschema"
1414
"github.com/modelcontextprotocol/go-sdk/mcp"
@@ -50,8 +50,8 @@ func generateReadmeDocs(readmePath string) error {
5050
// Create translation helper
5151
t, _ := translations.TranslationHelper()
5252

53-
// Build inventory - stateless, no dependencies needed for doc generation
54-
r := github.NewInventory(t).Build()
53+
// Build registry - stateless, no dependencies needed for doc generation
54+
r := github.NewRegistry(t).Build()
5555

5656
// Generate toolsets documentation
5757
toolsetsDoc := generateToolsetsDoc(r)
@@ -104,7 +104,7 @@ func generateRemoteServerDocs(docsPath string) error {
104104
return os.WriteFile(docsPath, []byte(updatedContent), 0600) //#nosec G306
105105
}
106106

107-
func generateToolsetsDoc(i *inventory.Inventory) string {
107+
func generateToolsetsDoc(r *registry.Registry) string {
108108
var buf strings.Builder
109109

110110
// Add table header and separator
@@ -116,14 +116,14 @@ func generateToolsetsDoc(i *inventory.Inventory) string {
116116

117117
// AvailableToolsets() returns toolsets that have tools, sorted by ID
118118
// Exclude context (custom description above) and dynamic (internal only)
119-
for _, ts := range i.AvailableToolsets("context", "dynamic") {
119+
for _, ts := range r.AvailableToolsets("context", "dynamic") {
120120
fmt.Fprintf(&buf, "| `%s` | %s |\n", ts.ID, ts.Description)
121121
}
122122

123123
return strings.TrimSuffix(buf.String(), "\n")
124124
}
125125

126-
func generateToolsDoc(r *inventory.Inventory) string {
126+
func generateToolsDoc(r *registry.Registry) string {
127127
// AllTools() returns tools sorted by toolset ID then tool name.
128128
// We iterate once, grouping by toolset as we encounter them.
129129
tools := r.AllTools()
@@ -133,7 +133,7 @@ func generateToolsDoc(r *inventory.Inventory) string {
133133

134134
var buf strings.Builder
135135
var toolBuf strings.Builder
136-
var currentToolsetID inventory.ToolsetID
136+
var currentToolsetID registry.ToolsetID
137137
firstSection := true
138138

139139
writeSection := func() {
@@ -299,8 +299,8 @@ func generateRemoteToolsetsDoc() string {
299299
// Create translation helper
300300
t, _ := translations.TranslationHelper()
301301

302-
// Build inventory - stateless
303-
r := github.NewInventory(t).Build()
302+
// Build registry - stateless
303+
r := github.NewRegistry(t).Build()
304304

305305
// Generate table header
306306
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")

cmd/github-mcp-server/main.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ var (
5454

5555
// Parse tools (similar to toolsets)
5656
var enabledTools []string
57-
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
58-
return fmt.Errorf("failed to unmarshal tools: %w", err)
57+
if viper.IsSet("tools") {
58+
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
59+
return fmt.Errorf("failed to unmarshal tools: %w", err)
60+
}
5961
}
6062

6163
// Parse enabled features (similar to toolsets)
6264
var enabledFeatures []string
63-
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
64-
return fmt.Errorf("failed to unmarshal features: %w", err)
65+
if viper.IsSet("features") {
66+
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
67+
return fmt.Errorf("failed to unmarshal features: %w", err)
68+
}
6569
}
6670

6771
ttl := viper.GetDuration("repo-access-cache-ttl")

docs/installation-guides/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ This directory contains detailed installation instructions for the GitHub MCP Se
44

55
## Installation Guides by Host Application
66
- **[GitHub Copilot in other IDEs](install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
7-
- **[Antigravity](install-antigravity.md)** - Installation for Google Antigravity IDE
87
- **[Claude Applications](install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI
98
- **[Cursor](install-cursor.md)** - Installation guide for Cursor IDE
109
- **[Google Gemini CLI](install-gemini-cli.md)** - Installation guide for Google Gemini CLI

docs/installation-guides/install-antigravity.md

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

docs/tool-renaming.md

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

e2e.test

-15.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)