Skip to content

Commit 53f188a

Browse files
Merge branch 'main' into fix-1714-getjoblogs-fails-0102-0752
2 parents b5bcf2f + 92bdc28 commit 53f188a

4 files changed

Lines changed: 53 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
8585
- **[Codex](/docs/installation-guides/install-codex.md)** - Installation guide for Open AI Codex
8686
- **[Cursor](/docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE
8787
- **[Windsurf](/docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE
88+
- **[Rovo Dev CLI](/docs/installation-guides/install-rovo-dev-cli.md)** - Installation guide for Rovo Dev CLI
8889

8990
> **Note:** Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.
9091
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Install GitHub MCP Server in Rovo Dev CLI
2+
3+
## Prerequisites
4+
5+
1. Rovo Dev CLI installed (latest version)
6+
2. [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) with appropriate scopes
7+
8+
## MCP Server Setup
9+
10+
Uses GitHub's hosted server at https://api.githubcopilot.com/mcp/.
11+
12+
### Install steps
13+
14+
1. Run `acli rovodev mcp` to open the MCP configuration for Rovo Dev CLI
15+
2. Add configuration by following example below.
16+
3. Replace `YOUR_GITHUB_PAT` with your actual [GitHub Personal Access Token](https://github.com/settings/tokens)
17+
4. Save the file and restart Rovo Dev CLI with `acli rovodev`
18+
19+
### Example configuration
20+
21+
```json
22+
{
23+
"mcpServers": {
24+
"github": {
25+
"url": "https://api.githubcopilot.com/mcp/",
26+
"headers": {
27+
"Authorization": "Bearer YOUR_GITHUB_PAT"
28+
}
29+
}
30+
}
31+
}
32+
```

pkg/errors/error.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ func NewGitHubAPIErrorToCtx(ctx context.Context, message string, resp *github.Re
120120
return ctx, nil
121121
}
122122

123+
func NewGitHubGraphQLErrorToCtx(ctx context.Context, message string, err error) (context.Context, error) {
124+
graphQLErr := newGitHubGraphQLError(message, err)
125+
if ctx != nil {
126+
_, _ = addGitHubGraphQLErrorToContext(ctx, graphQLErr) // Explicitly ignore error for graceful handling
127+
}
128+
return ctx, nil
129+
}
130+
123131
func addGitHubAPIErrorToContext(ctx context.Context, err *GitHubAPIError) (context.Context, error) {
124132
if val, ok := ctx.Value(GitHubErrorKey{}).(*GitHubCtxErrors); ok {
125133
val.api = append(val.api, err) // append the error to the existing slice in the context

pkg/github/issues.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,11 @@ func CreateIssue(ctx context.Context, client *github.Client, owner string, repo
11751175

11761176
issue, resp, err := client.Issues.Create(ctx, owner, repo, issueRequest)
11771177
if err != nil {
1178-
return utils.NewToolResultErrorFromErr("failed to create issue", err), nil
1178+
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1179+
"failed to create issue",
1180+
resp,
1181+
err,
1182+
), nil
11791183
}
11801184
defer func() { _ = resp.Body.Close() }()
11811185

@@ -1522,7 +1526,11 @@ func ListIssues(t translations.TranslationHelperFunc) inventory.ServerTool {
15221526

15231527
issueQuery := getIssueQueryType(hasLabels, hasSince)
15241528
if err := client.Query(ctx, issueQuery, vars); err != nil {
1525-
return utils.NewToolResultError(err.Error()), nil, nil
1529+
return ghErrors.NewGitHubGraphQLErrorResponse(
1530+
ctx,
1531+
"failed to list issues",
1532+
err,
1533+
), nil, nil
15261534
}
15271535

15281536
// Extract and convert all issue nodes using the common interface
@@ -1683,7 +1691,7 @@ func AssignCopilotToIssue(t translations.TranslationHelperFunc) inventory.Server
16831691
var query suggestedActorsQuery
16841692
err := client.Query(ctx, &query, variables)
16851693
if err != nil {
1686-
return nil, nil, err
1694+
return ghErrors.NewGitHubGraphQLErrorResponse(ctx, "failed to get suggested actors", err), nil, nil
16871695
}
16881696

16891697
// Iterate all the returned nodes looking for the copilot bot, which is supposed to have the
@@ -1729,7 +1737,7 @@ func AssignCopilotToIssue(t translations.TranslationHelperFunc) inventory.Server
17291737
}
17301738

17311739
if err := client.Query(ctx, &getIssueQuery, variables); err != nil {
1732-
return utils.NewToolResultError(fmt.Sprintf("failed to get issue ID: %v", err)), nil, nil
1740+
return ghErrors.NewGitHubGraphQLErrorResponse(ctx, "failed to get issue ID", err), nil, nil
17331741
}
17341742

17351743
// Finally, do the assignment. Just for reference, assigning copilot to an issue that it is already

0 commit comments

Comments
 (0)