Created
May 3, 2019 16:00
-
-
Save Chris-Engelhardt/8618c2aef37dfe2b7278c8936db89b0d to your computer and use it in GitHub Desktop.
Set the stage to make a GitHub PR for Windows users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(git2r) | |
library(glue) | |
library(usethis) | |
prep_for_pr <- function(username, repo_spec){ | |
use_git_protocol("ssh") | |
creds <- cred_ssh_key(publickey = glue("C:/Users/{username}/.ssh/id_rsa.pub"), | |
privatekey = glue("C:/Users/{username}/.ssh/id_rsa"), | |
passphrase = character(0)) | |
use_git_credentials(credentials = creds) | |
create_from_github(glue("{repo_spec}", | |
destdir = "C:/Users/{username}/Desktop")) | |
} | |
prep_for_pr("chrisengelhardt", "r-lib/usethis") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment