diff --git a/DESCRIPTION b/DESCRIPTION index 656621b..83d8c48 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: codecheck Title: Helper Functions for CODECHECK Project -Version: 0.11.0 +Version: 0.11.1 Authors@R: c(person(given = "Stephen", family = "Eglen", diff --git a/R/utils_render_cert_htmls.R b/R/utils_render_cert_htmls.R index 7967d44..17f742f 100644 --- a/R/utils_render_cert_htmls.R +++ b/R/utils_render_cert_htmls.R @@ -43,7 +43,12 @@ render_cert_htmls <- function(register_table, force_download = FALSE){ Sys.sleep(CONFIG$CERT_REQUEST_DELAY) } - render_cert_html(cert_id, register_table[i, ]$Repository, download_cert_status=1) + # The pdf exists and force download is False + else{ + download_cert_status <- 1 + } + + render_cert_html(cert_id, register_table[i, ]$Repository, download_cert_status) } } diff --git a/R/utils_render_cert_md.R b/R/utils_render_cert_md.R index 9ec1853..a0f4f03 100644 --- a/R/utils_render_cert_md.R +++ b/R/utils_render_cert_md.R @@ -201,7 +201,7 @@ add_abstract <- function(repo_link, md_content){ create_cert_md <- function(cert_id, repo_link, download_cert_status){ cert_dir <- file.path(CONFIG$CERTS_DIR[["cert"]], cert_id) - # Initially checking if a cert is available + # Loading the correct template based on whether cert exists if (download_cert_status == 0) { template_type <- "md_template_no_cert" } @@ -218,6 +218,7 @@ create_cert_md <- function(cert_id, repo_link, download_cert_status){ # We add the report link in the subtext when we do not have cert if (download_cert_status == 0){ + config_yml <- get_codecheck_yml(repo_link) report_hyperlink <- paste0("[link](", config_yml$report, ")") md_content <- gsub("\\$codecheck_report_subtext\\$", report_hyperlink, md_content) }