-
Notifications
You must be signed in to change notification settings - Fork 303
Description
usethis has great utilities for setting up a vanilla template using create_package(), along with use_git(), use_github() , as @jennybc describes in https://community.rstudio.com/t/procedure-to-create-a-project-for-a-package-destined-for-github/2054/4.
But this twitter thread got me thinking: often rather start with my own template: don't have to enter my name, choose my usual license, and other tweaks. Moreover, sometimes my template isn't a package, but a more minimal project repo; or maybe it's a specific template for some classroom assignment I want students to use.
It would be nice to have a function to deploy some existing template repo. e.g. this is basically what GitHub forking does, without creating the 'fork' connection, and allowing a new repo name. (Similar also to what GitHub Classroom does, but that's bound to a single organization destination).
I think this would be a straight-forward wrapper around existing git2r / command-line git calls to rename the remote origin; possibly with a gh wrapper (or just single github API call via httr to avoid the dependency?) to create the new repo on GitHub. I sketched a prototype of this here: https://github.com/cboettig/template/blob/master/R/template.R. Would be happy to send a PR if something along these lines makes sense, though no doubt the usethis team could manage a more robust implementation more efficiently anyhow, if it's worth doing.
Thanks for your thoughts.