-
|
I was trying to add a PR as resource. I couldn't understand how the proper |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
That is definitely an interesting idea, but you would need to wire in an API call, and then format the response. I think it could be a great idea to support more types or resources though! I have also thought about it. |
Beta Was this translation helpful? Give feedback.
-
|
Would be really useful if PRs could be exposed as first-class resources directly instead of manually wiring API calls + formatting responses. Having native PR context support for agents would make review and code analysis workflows much cleaner. |
Beta Was this translation helpful? Give feedback.
-
|
PRs are exposed as resources by this server today — just only the file contents at the PR head ref, not the PR's metadata/conversation. The URI template is defined in So
The handler walks What this resource does not give you:
For those, use the So the short answer:
|
Beta Was this translation helpful? Give feedback.
PRs are exposed as resources by this server today — just only the file contents at the PR head ref, not the PR's metadata/conversation. The URI template is defined in
pkg/github/repository_resource.go:So
pathis the file path inside the repo at the PR's head commit, exactly like browsing the PR's "Files changed" tab and selecting a file. A few concrete examples for this very server:repo://github/github-mcp-server/refs/pull/2186/head/contents/repo://github/github-mcp-server/refs/pull/2186/head/contents/README.mdrepo://github/github-mcp-ser…