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

repo-create: allow creation from a GitHub template repository #56

Open
salewski opened this issue Oct 11, 2020 · 0 comments
Open

repo-create: allow creation from a GitHub template repository #56

salewski opened this issue Oct 11, 2020 · 0 comments
Labels
severity: 7 (wishlist) status:acknowledged type:feature Adds a new capability or behavioral property

Comments

@salewski
Copy link
Owner

Background reading

GitHub v3 API endpoint:

    POST /repos/:template_owner/:template_repo/generate

Feature description

The ads-github-repo-create program could support a --from-tempalte=TMPL_REPO_NAME option to allow for the creation of a new repository from a GitHub "template repository".

Notes

At the time of writing (2020-10), v3 API support for template repo features requires that the following HTTP header be provided (as the developer's acknowledgement that the features are experimental):

    Accept: application/vnd.github.baptiste-preview+json

The user would be specifying the template repository to use in the TMPL_REPO_NAME argument. As noted in the GH v3 API docs, that value can be sanity checked to confirm that it really does represent a "template repository" by checking the repo's is_template property.

Some notes based on some empirical testing in the GitHub web UI:

  • Not all repository attributes are copied verbatim into the newly created repo
  • Attributes that are copied include:
    • Repo description
    • Default branch name
    • Files and directory structure
  • Attributes that are not copied include:
    • Public/Private visibility setting (though there is a private parameter to explicitly set this in the API)
    • Issues enabled/disabled flag
    • Projects enabled/disabled flag
    • Wiki enabled/disabled flag
    • Issue "Labels" (Customized labels in the template repository are not present in the newly created repo)
  • Ambiguous/Requires further testing
    • Branches other than the default. (The web UI has a checkbox to include them, but it is not checked by default. There does not seem to be a corresponding parameter in the v3 API for this decisions; need to find out what the behavior is.)
@salewski salewski added severity: 7 (wishlist) status:acknowledged type:feature Adds a new capability or behavioral property labels Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: 7 (wishlist) status:acknowledged type:feature Adds a new capability or behavioral property
Projects
None yet
Development

No branches or pull requests

1 participant