github / github/github-mcp-server

Add setting to restrict actions to the current repo

Đang mở
#1,694 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Go
Star
33k
Fork
5k
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
52

Mô tả

### Describe the feature or problem you’d like to solve

If I ask copilot to pull the issues, or create a new issue, it is possible that it uses the wrong owner / repo and pull random issues or tries to create issues on non-existing repos.

Then after an error, it runs `git remote -v` or calls the tool `get_me` and re-does the action.

For now, it never happened that it created issues on other people repos, but it would like to exclude the possibility entirely.

### Proposed solution

Add a setting to restrict all actions to the current repo.
This would remove the "owner" and "repo" from all tool calls.

### Example prompts or workflows (for tools/toolsets only)

### Additional context

For example, the "add comment to issue" tool would become:

```
{
"body": "....",
"issue_number": 109
}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.