From e01ee18570972eabf244350267b1de0e4b02dcb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Wed, 26 Aug 2020 16:30:25 +0200 Subject: [PATCH] Template for PR --- R/auto.R | 5 ++++- inst/templates/pr.md | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 inst/templates/pr.md diff --git a/R/auto.R b/R/auto.R index 44cc1e5f7..f1c38f000 100644 --- a/R/auto.R +++ b/R/auto.R @@ -385,6 +385,9 @@ create_pull_request <- function(release_branch, main_branch, remote_name, force) if (create) { info <- github_info(remote = remote_name) + template_path <- system.file("templates", "pr.md", package = "fledge") + body <- glue_collapse(readLines(template_path), sep = "\n") + gh::gh("POST /repos/:owner/:repo/pulls", owner = info$owner$login, repo = info$name, @@ -396,7 +399,7 @@ create_pull_request <- function(release_branch, main_branch, remote_name, force) base = main_branch, maintainer_can_modify = TRUE, draft = TRUE, - body = readChar("cran-comments.md", file.info("cran-comments.md")$size) + body = body ) } usethis::pr_view() diff --git a/inst/templates/pr.md b/inst/templates/pr.md new file mode 100644 index 000000000..bc442b3cd --- /dev/null +++ b/inst/templates/pr.md @@ -0,0 +1,3 @@ +- [ ] Resolve all tasks in `cran-comments.md` +- [ ] Run `fledge::release()` +- [ ] When the package is accepted on CRAN, run `fledge::post_release()`