Skip to content

Commit

Permalink
Template for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 26, 2020
1 parent 83c8188 commit e01ee18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions inst/templates/pr.md
Original file line number Diff line number Diff line change
@@ -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()`

0 comments on commit e01ee18

Please sign in to comment.