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

Feature request: Github template repo #1974

Closed
Hanaasagi opened this issue Jun 17, 2021 · 3 comments
Closed

Feature request: Github template repo #1974

Hanaasagi opened this issue Jun 17, 2021 · 3 comments
Labels

Comments

@Hanaasagi
Copy link
Contributor

Template repository is a quick way to generate new repositories with the same directory structure, branches, and files. And Github REST API gives a way to using this feature:

Creating and using repository templates is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.baptiste-preview+json

I think the change involves:

  1. Add is_template property in Repository class
  2. Add is_template param in Repository.edit method
  3. Add new function create_repo_from_template

Reference:
https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template
https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/creating-a-template-repository

@Hanaasagi
Copy link
Contributor Author

@s-t-e-v-e-n-k What do you think about it?

@simkimsia
Copy link
Contributor

I need this as well. I don't mind sending a PR. How do I go about doing this roughly? How do I add unit test for this behavior?

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@stale stale bot closed this as completed Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants