- Notifications
You must be signed in to change notification settings - Fork2.7k
Add return ID to CRUD tools#1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR updates the CRUD operations in the GitHub MCP Server to include resource IDs in minimal responses, enhancing client-side resource management. The change extends theMinimalResponse
struct to include anID
field alongside the existingURL
field.
Key changes:
- Added
ID
field toMinimalResponse
struct for consistent resource identification - Updated all CRUD operations to populate the new ID field using the resource's GitHub ID
- Ensured consistent formatting of IDs across different resource types
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
pkg/github/minimal_types.go | Added ID field to MinimalResponse struct |
pkg/github/repositories.go | Updated repository creation and fork operations to include ID |
pkg/github/pullrequests.go | Updated pull request creation and update operations to include ID |
pkg/github/issues.go | Updated issue creation and update operations to include ID |
pkg/github/gists.go | Updated gist creation and update operations to include ID |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0c5cfc3
intomainUh oh!
There was an error while loading.Please reload this page.
* add return ID to crud tools* Update pkg/github/gists.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Update pkg/github/gists.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* fix gist id to string conv---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
This pull request updates the
MinimalResponse
struct to include anID
field alongside the existingURL
field. This change ensures that all minimal responses now return both the unique identifier and the URL for created or updated resources, making it easier for clients to reference resources directly.ID
field to theMinimalResponse
struct inpkg/github/minimal_types.go
, allowing API responses to include both the resource ID and URL.CreateGist
,UpdateGist
,CreateIssue
,UpdateIssue
,CreatePullRequest
,UpdatePullRequest
,CreateRepository
,ForkRepository
) to set theID
field in their minimal responses.[1][2][3][4][5][6][7][8]Closes:#1071