Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug- fix cert pages with no cert preview #76

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 6 additions & 1 deletion R/utils_render_cert_htmls.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
3 changes: 2 additions & 1 deletion R/utils_render_cert_md.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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)
}
Expand Down
Loading