Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add create_repository_from_template tool#1678

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

Draft
Copilot wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/add-repo-creation-tool

Conversation

Copy link
Contributor

CopilotAI commentedDec 23, 2025
edited
Loading

Summary

Adds MCP tool to create repositories from GitHub templates via the/repos/{owner}/{repo}/generate API endpoint.

Why

Creating repositories from templates is more common than creating empty repositories for bootstrapping projects with standard configurations.

What changed

  • AddedCreateRepositoryFromTemplate function inrepositories.go
  • Registered tool inAllTools list
  • Added 5 unit tests covering success and error paths
  • Generated toolsnap and documentation

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

New toolcreate_repository_from_template with parameters:

  • Required:template_owner,template_repo,name
  • Optional:description,owner,private,include_all_branches

Prompts tested (tool changes only)

  • "Create a new repo called my-app from the template github/octocat-repo-template"
  • "Use template-owner/template-repo to create new-repo with all branches included"
  • "Make a private repository named test-proj from owner/template"

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Uses existing auth flow. GitHub enforces template access permissions server-side.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases indeprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with./script/lint
  • Tested locally with./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

README auto-generated with tool documentation.

Original prompt

This section details on the original issue you should resolve

<issue_title>allow users to create repositories from a repository template.</issue_title>
<issue_description>### Describe the feature or problem you’d like to solve

GitHub has a very usefull feature of repositroy template, creating a repositroy from a template is likely more usefull MCP tool than creating a repo from scratch.

Proposed solution

Add a tool that creates a repo from template

Additional context

https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template</issue_description>

Comments on the Issue (you are@copilot in this section)

@SamMorrowDrumsThere have been a number of attempts, and I'm curious to get something together. For now I'll assign this to copilot and see what it can drive from the prior attempts and current arch and see if there is a good version of this, I want to determine if a new tool is preferable to an additional arg when creating for example.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.

CopilotAIand others added2 commitsDecember 23, 2025 14:03
- Implement CreateRepositoryFromTemplate function using GitHub's template API- Add comprehensive unit tests with 5 test cases- Register tool in AllTools list- Generate toolsnap and update documentationCo-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
- Only set owner and description if non-empty- Prevents sending empty strings to GitHub API which could be misinterpreted- All tests still passCo-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
CopilotAI changed the title[WIP] Add tool for creating repositories from templatesAdd create_repository_from_template toolDec 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@SamMorrowDrumsSamMorrowDrumsAwaiting requested review from SamMorrowDrums

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

allow users to create repositories from a repository template.

2 participants

@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp