Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tool to create repository from template #229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crondinini
Copy link

@crondinini crondinini commented Apr 11, 2025

Description

Adds a "Create Repository From Template" tool that follows the established pattern from the existing "Create Repository" tool. I did not find any existing issue to link here.

This functionality was implemented as a separate tool rather than extending the existing "Create Repository" tool for two main reasons:

  1. The requirements for template-based repository creation differ significantly from standard repository creation
  2. The Go GitHub client library itself uses distinct methods for these operations, reinforcing this separation of concerns

Video

Walkthrough of the tool being used in Cursor

walkthrough.mp4

@Copilot Copilot bot review requested due to automatic review settings April 11, 2025 20:25
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.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

pkg/github/repositories.go:454

  • Consider ensuring that resp.Body is closed in all cases, including when an error is returned from CreateFromTemplate, to avoid potential resource leaks.
createdRepo, resp, err := client.Repositories.CreateFromTemplate(ctx, templateOwner, templateRepo, templateReq)

@crondinini crondinini changed the title feat: add create repo from template Add tool to create repository from template Apr 11, 2025
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.

1 participant