-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from katilingban/dev
create add issue template functions
- Loading branch information
Showing
13 changed files
with
205 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Initial CRAN release | ||
about: Checklist of tasks for initial CRAN release | ||
title: Checklist of tasks for initial CRAN release | ||
labels: documentation | ||
assignees: ernestguevarra | ||
--- | ||
|
||
* [ ] `usethis::use_news_md()` | ||
* [ ] `usethis::use_cran_comments()` | ||
* [ ] Update (aspirational) install instructions in `README` | ||
* [ ] Proofread `Title:` and `Description:` | ||
* [ ] Check that all exported functions have `@returns` and `@examples` | ||
* [ ] Check that `Authors@R:` includes a copyright holder (role 'cph') | ||
* [ ] Check licensing of included files | ||
* [ ] Review https://github.com/DavisVaughan/extrachecks |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#' | ||
#' Add issue templates | ||
#' | ||
#' @param issue A character value of type of issue template to create. Choices | ||
#' are *"initial-cran-release"*, *"update-cran-release"*, | ||
#' *"submission-cran"*, and *"acceptance-cran"*. | ||
#' @param path Path to file to add issue template into. Set to | ||
#' ".github/ISSUE_TEMPLATE" which is the default location specified by | ||
#' GitHub. | ||
#' @param overwrite Logical. If an exising issue template with the same file | ||
#' name is found, should it be overwritten? Default to FALSE. | ||
#' | ||
#' @returns A specified issue template markdown file in the specified `path`. | ||
#' | ||
#' @examples | ||
#' if (interactive()) add_issue_template("initial-cran-release") | ||
#' | ||
#' @rdname add_issue | ||
#' @export | ||
#' | ||
|
||
add_issue_template <- function(issue, | ||
path = ".github/ISSUE_TEMPLATE", | ||
overwrite = FALSE) { | ||
## Create path ---- | ||
if (!dir.exists(path)) dir.create(path) | ||
|
||
## Get issue template file name ---- | ||
template_file_name <- paste0(issue, ".md") | ||
|
||
## Check if file already exists ---- | ||
if (file.exists(file.path(path, template_file_name)) & !overwrite) { | ||
message( | ||
"Issue template already exists and overwrite = FALSE. No changes made." | ||
) | ||
} else { | ||
## Get template ---- | ||
issue_template <- readLines( | ||
con = system.file("templates", template_file_name, package = "pakete") | ||
) | ||
|
||
withr::with_output_sink( | ||
new = file.path(path, template_file_name), | ||
code = writeLines( | ||
text = issue_template, con = file.path(path, template_file_name) | ||
) | ||
) | ||
|
||
message( | ||
paste0( | ||
"Issue template created at ", file.path(path, template_file_name), ".") | ||
) | ||
} | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
bibentry( | ||
bibtype = "Manual", | ||
header = "To cite pakete in publications use:", | ||
title = "pakete: Utilities for Package Development", | ||
author = person("Ernest Guevarra"), | ||
year = "2024", | ||
note = "R package version 0.0.9000", | ||
url = "https://katilingban.io/pakete/", | ||
doi = "" | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Post-CRAN acceptance | ||
about: Checklist of tasks for post-CRAN acceptance | ||
title: Checklist of tasks for post-CRAN acceptance | ||
labels: documentation | ||
assignees: ernestguevarra | ||
--- | ||
|
||
* [ ] Accepted | ||
* [ ] `git push` | ||
* [ ] `usethis::use_github_release()` | ||
* [ ] `usethis::use_dev_version()` | ||
* [ ] `git push` | ||
* { ] Finish blog post, share on social media, etc. | ||
* [ ] Add link to blog post in `pkgdown` news menu |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Initial CRAN release | ||
about: Checklist of tasks for initial CRAN release | ||
title: Checklist of tasks for initial CRAN release | ||
labels: documentation | ||
assignees: ernestguevarra | ||
--- | ||
|
||
* [ ] `usethis::use_news_md()` | ||
* [ ] `usethis::use_cran_comments()` | ||
* [ ] Update (aspirational) install instructions in `README` | ||
* [ ] Proofread `Title:` and `Description:` | ||
* [ ] Check that all exported functions have `@returns` and `@examples` | ||
* [ ] Check that `Authors@R:` includes a copyright holder (role 'cph') | ||
* [ ] Check licensing of included files | ||
* [ ] Review https://github.com/DavisVaughan/extrachecks |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: CRAN submission | ||
about: Checklist of tasks for CRAN submission | ||
title: Checklist of tasks for CRAN submission | ||
labels: documentation | ||
assignees: ernestguevarra | ||
--- | ||
|
||
* [ ] `usethis::use_version('minor')` (or ‘patch’ or ‘major’) | ||
* [ ] `devtools::submit_cran()` | ||
* [ ] Approve email | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Update CRAN release | ||
about: Checklist of tasks for update CRAN release | ||
title: Checklist of tasks for update CRAN release | ||
labels: documentation | ||
assignees: ernestguevarra | ||
--- | ||
|
||
* [ ] Check current CRAN check results | ||
* [ ] Check if any deprecation processes should be advanced, as described in [Gradual deprecation](https://lifecycle.r-lib.org/articles/communicate.html#gradual-deprecation) | ||
* [ ] [Polish NEWS](https://style.tidyverse.org/news.html#news-release) | ||
* [ ] `urlchecker::url_check()` | ||
* [ ] `devtools::build_readme()` | ||
* [ ] `devtools::check(remote = TRUE, manual = TRUE)` | ||
* [ ] `devtools::check_win_devel()` | ||
* [ ] `usethis::use_revdep()` then `revdepcheck::revdep_check(num_workers = 4)` | ||
* [ ] Update `cran-comments.md` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.