Skip to content

Conversation

mattdholloway
Copy link
Contributor

@mattdholloway mattdholloway commented Sep 10, 2025

This pull request updates the MinimalResponse struct to include an ID field alongside the existing URL 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.

  • Added an ID field to the MinimalResponse struct in pkg/github/minimal_types.go, allowing API responses to include both the resource ID and URL.
  • Updated all relevant API handlers (CreateGist, UpdateGist, CreateIssue, UpdateIssue, CreatePullRequest, UpdatePullRequest, CreateRepository, ForkRepository) to set the ID field in their minimal responses. [1] [2] [3] [4] [5] [6] [7] [8]

Closes: #1071

@mattdholloway mattdholloway requested a review from a team as a code owner September 10, 2025 16:09
@Copilot Copilot AI review requested due to automatic review settings September 10, 2025 16:09
Copy link
Contributor

@Copilot Copilot AI left a 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 the MinimalResponse struct to include an ID field alongside the existing URL field.

Key changes:

  • Added ID field to MinimalResponse 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 or learn how to get started.

mattdholloway and others added 3 commits September 10, 2025 17:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mattdholloway mattdholloway self-assigned this Sep 10, 2025
@mattdholloway mattdholloway merged commit 0c5cfc3 into main Sep 11, 2025
16 checks passed
@mattdholloway mattdholloway deleted the add-id-to-crud-tool-response branch September 11, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include id in the response of create_issue
2 participants