Skip to content

Commit

Permalink
đź“ť Documentation gets a new git category
Browse files Browse the repository at this point in the history
Move all git related functions into the new category. Revise the other categories.
  • Loading branch information
ThierryO committed Dec 10, 2024
1 parent 5711c24 commit 3cc8199
Show file tree
Hide file tree
Showing 50 changed files with 133 additions and 244 deletions.
2 changes: 1 addition & 1 deletion R/clean_git.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' git_remote_list
#' @importFrom withr defer
#' @export
#' @family utils
#' @family git
clean_git <- function(repo = ".", verbose = TRUE) {
assert_that(is_workdir_clean(repo))

Expand Down
2 changes: 1 addition & 1 deletion R/create_draft_pr.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @importFrom gert git_info git_remote_info
#' @importFrom gh gh
#' @export
#' @family package
#' @family git
create_draft_pr <- function(x = ".") {
x <- read_checklist(x)
stopifnot("Current version only relevant for R packages" = x$package)
Expand Down
2 changes: 1 addition & 1 deletion R/new_branch.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @importFrom assertthat assert_that is.string
#' @importFrom gert git_branch_list git_branch_create git_push
#' @export
#' @family utils
#' @family git
new_branch <- function(branch, verbose = TRUE, checkout = TRUE, repo = ".") {
assert_that(is.string(branch))

Expand Down
2 changes: 1 addition & 1 deletion R/set_tag.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @importFrom gert git_config git_config_set git_info git_tag_create
#' git_tag_list
#' @importFrom withr defer
#' @family package
#' @family git
set_tag <- function(x = ".") {
if (
!as.logical(Sys.getenv("GITHUB_ACTIONS", "false")) ||
Expand Down
2 changes: 1 addition & 1 deletion R/update_citation.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @importFrom desc description
#' @importFrom gert git_status
#' @importFrom utils file_test
#' @family package
#' @family both
update_citation <- function(x = ".", quiet = FALSE) {
x <- read_checklist(x = x)
cit_meta <- citation_meta$new(x$get_path)
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ yesno <- function(...) {
#' Otherwise `FALSE`
#' @export
#' @importFrom gert git_status
#' @family utils
#' @family git
is_workdir_clean <- function(repo) {
status <- git_status(repo = repo)
status <- status[!(status$status == "new" & !status$staged), ]
Expand Down Expand Up @@ -255,7 +255,7 @@ quiet_cat <- function(x, quiet = FALSE, ...) {
#' @importFrom gert git_find
#' @return TRUE if directory is in a git repository else FALSE
#' @export
#' @family utils
#' @family git
is_repository <- function(path = ".") {
out <- tryCatch(git_find(path = path), error = function(e) e)
!any(class(out) == "error")
Expand Down
2 changes: 1 addition & 1 deletion R/write_citation_cff.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @param roles No longer used.
#' @export
#' @importFrom assertthat assert_that
#' @family package
#' @family both
write_citation_cff <- function(x = ".", roles) {
# nocov start
.Deprecated(new = "update_citation", package = "checklist")
Expand Down
2 changes: 1 addition & 1 deletion R/write_zenodo_json.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @importFrom desc description
#' @importFrom jsonlite toJSON
#' @importFrom gert git_status
#' @family package
#' @family both
write_zenodo_json <- function(x = ".") {
.Deprecated(new = "update_citation", package = "checklist") # nocov start
x <- update_citation(x = x)
Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ reference:
- title: Setting up a project use the checklist package
contents:
- has_concept("setup")
- title: Git related functions
contents:
- has_concept("git")
- title: R6 class behind the checklist package
contents:
- has_concept("class")
Expand Down
5 changes: 4 additions & 1 deletion man/add_badges.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/ask_yes_no.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/author2df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/bookdown_zenodo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/c_sort.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_codemeta.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_cran.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_description.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_documentation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_environment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/check_filename.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_license.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/check_lintr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions man/check_package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/check_spelling.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 4 additions & 15 deletions man/clean_git.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 7 additions & 14 deletions man/create_draft_pr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/create_hexsticker.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/custom_dictionary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/default_organisation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3cc8199

Please sign in to comment.