Skip to content

Commit 4df5257

Browse files
Merge branch 'main' into fix/read-only-ui-resources-v2
2 parents c64b132 + 1654d32 commit 4df5257

47 files changed

Lines changed: 1964 additions & 649 deletions

Some content is hidden

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY ui/ ./ui/
77
RUN mkdir -p ./pkg/github/ui_dist && \
88
cd ui && npm run build
99

10-
FROM golang:1.25.10-alpine@sha256:8d22e29d960bc50cd025d93d5b7c7d220b1ee9aa7a239b3c8f55a57e987e8d45 AS build
10+
FROM golang:1.25.11-alpine@sha256:cd2fb3559df6e13bc93b7f0734a4eabe1d21e7b64eec211ed90784f00a17a56a AS build
1111
ARG VERSION="dev"
1212

1313
# Set the working directory

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@ The following sets of tools are available:
717717
- **list_dependabot_alerts** - List dependabot alerts
718718
- **Required OAuth Scopes**: `security_events`
719719
- **Accepted OAuth Scopes**: `repo`, `security_events`
720+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
720721
- `owner`: The owner of the repository. (string, required)
721-
- `page`: Page number for pagination (min 1) (number, optional)
722722
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
723723
- `repo`: The name of the repository. (string, required)
724724
- `severity`: Filter dependabot alerts by severity (string, optional)
@@ -755,7 +755,7 @@ The following sets of tools are available:
755755

756756
- **get_discussion_comments** - Get discussion comments
757757
- **Required OAuth Scopes**: `repo`
758-
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
758+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
759759
- `discussionNumber`: Discussion Number (number, required)
760760
- `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)
761761
- `owner`: Repository owner (string, required)
@@ -769,7 +769,7 @@ The following sets of tools are available:
769769

770770
- **list_discussions** - List discussions
771771
- **Required OAuth Scopes**: `repo`
772-
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
772+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
773773
- `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
774774
- `direction`: Order direction. (string, optional)
775775
- `orderBy`: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)
@@ -826,7 +826,7 @@ The following sets of tools are available:
826826

827827
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> Issues</summary>
828828

829-
- **add_issue_comment** - Add comment to issue
829+
- **add_issue_comment** - Add comment to issue or pull request
830830
- **Required OAuth Scopes**: `repo`
831831
- `body`: Comment content (string, required)
832832
- `issue_number`: Issue number to comment on (number, required)
@@ -854,7 +854,7 @@ The following sets of tools are available:
854854
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
855855
- `repo`: The name of the repository (string, required)
856856

857-
- **issue_write** - Create or update issue
857+
- **issue_write** - Create or update issue/pull request
858858
- **Required OAuth Scopes**: `repo`
859859
- `assignees`: Usernames to assign to this issue (string[], optional)
860860
- `body`: Issue body content (string, optional)
@@ -881,7 +881,7 @@ The following sets of tools are available:
881881

882882
- **list_issues** - List issues
883883
- **Required OAuth Scopes**: `repo`
884-
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
884+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
885885
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
886886
- `labels`: Filter by labels (string[], optional)
887887
- `orderBy`: Order issues by field. If provided, the 'direction' also needs to be provided. (string, optional)

docs/feature-flags.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ runtime behavior (such as output formatting) won't appear here.
5050
- **MCP App UI**: `ui://github-mcp-server/get-me`
5151
- No parameters required
5252

53-
- **issue_write** - Create or update issue
53+
- **issue_write** - Create or update issue/pull request
5454
- **Required OAuth Scopes**: `repo`
5555
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5656
- `assignees`: Usernames to assign to this issue (string[], optional)
@@ -73,7 +73,7 @@ runtime behavior (such as output formatting) won't appear here.
7373

7474
### `remote_mcp_issue_fields`
7575

76-
- **issue_write** - Create or update issue
76+
- **issue_write** - Create or update issue/pull request
7777
- **Required OAuth Scopes**: `repo`
7878
- `assignees`: Usernames to assign to this issue (string[], optional)
7979
- `body`: Issue body content (string, optional)
@@ -102,7 +102,7 @@ runtime behavior (such as output formatting) won't appear here.
102102

103103
- **list_issues** - List issues
104104
- **Required OAuth Scopes**: `repo`
105-
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
105+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
106106
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
107107
- `field_filters`: Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date). (object[], optional)
108108
- `labels`: Filter by labels (string[], optional)

docs/insiders-features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The list below is generated from the Go source. It covers tool **inventory and s
4444
- **MCP App UI**: `ui://github-mcp-server/get-me`
4545
- No parameters required
4646

47-
- **issue_write** - Create or update issue
47+
- **issue_write** - Create or update issue/pull request
4848
- **Required OAuth Scopes**: `repo`
4949
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5050
- `assignees`: Usernames to assign to this issue (string[], optional)
@@ -67,7 +67,7 @@ The list below is generated from the Go source. It covers tool **inventory and s
6767

6868
### `remote_mcp_issue_fields`
6969

70-
- **issue_write** - Create or update issue
70+
- **issue_write** - Create or update issue/pull request
7171
- **Required OAuth Scopes**: `repo`
7272
- `assignees`: Usernames to assign to this issue (string[], optional)
7373
- `body`: Issue body content (string, optional)
@@ -96,7 +96,7 @@ The list below is generated from the Go source. It covers tool **inventory and s
9696

9797
- **list_issues** - List issues
9898
- **Required OAuth Scopes**: `repo`
99-
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
99+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
100100
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
101101
- `field_filters`: Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date). (object[], optional)
102102
- `labels`: Filter by labels (string[], optional)

pkg/errors/error.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package errors
22

33
import (
44
"context"
5+
stderrors "errors"
56
"fmt"
67
"net/http"
8+
"time"
79

810
"github.com/github/github-mcp-server/pkg/utils"
911
"github.com/google/go-github/v87/github"
@@ -159,6 +161,35 @@ func NewGitHubAPIErrorResponse(ctx context.Context, message string, resp *github
159161
if ctx != nil {
160162
_, _ = addGitHubAPIErrorToContext(ctx, apiErr) // Explicitly ignore error for graceful handling
161163
}
164+
165+
var rateLimitErr *github.RateLimitError
166+
if stderrors.As(err, &rateLimitErr) {
167+
resetTime := rateLimitErr.Rate.Reset.Time
168+
if !resetTime.IsZero() {
169+
retryIn := time.Until(resetTime).Round(time.Second)
170+
if retryIn > 0 {
171+
return utils.NewToolResultError(fmt.Sprintf(
172+
"%s: GitHub API rate limit exceeded. Retry after %v.", message, retryIn))
173+
}
174+
}
175+
return utils.NewToolResultError(fmt.Sprintf(
176+
"%s: GitHub API rate limit exceeded. Wait before retrying.", message))
177+
}
178+
179+
var abuseErr *github.AbuseRateLimitError
180+
if stderrors.As(err, &abuseErr) {
181+
if abuseErr.RetryAfter != nil {
182+
retryAfter := abuseErr.RetryAfter.Round(time.Second)
183+
if retryAfter > 0 {
184+
return utils.NewToolResultError(fmt.Sprintf(
185+
"%s: GitHub secondary rate limit exceeded. Retry after %v.",
186+
message, retryAfter))
187+
}
188+
}
189+
return utils.NewToolResultError(fmt.Sprintf(
190+
"%s: GitHub secondary rate limit exceeded. Wait before retrying.", message))
191+
}
192+
162193
return utils.NewToolResultErrorFromErr(message, err)
163194
}
164195

0 commit comments

Comments
 (0)