Skip to content

Commit

Permalink
Merge pull request #476 from carpentries/avoid-gert-config-449
Browse files Browse the repository at this point in the history
do not use gert for pkgdown config
  • Loading branch information
zkamvar authored Jun 2, 2023
2 parents e049976 + 457d967 commit 2110fad
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sandpaper
Title: Create and Curate Carpentries Lessons
Version: 0.12.2
Version: 0.12.3
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# sandpaper 0.12.3 (2023-06-01)

* A bug where the git credentials are accidentally changed when a lesson is
built is fixed by no longer querying git author when the lesson is built.
(reported: @joelnitta, @velait, and @zkamvar, #449; fixed: @zkamvar, #476).

# sandpaper 0.12.2 (2023-05-29)

## BUG FIX
Expand Down
1 change: 0 additions & 1 deletion R/create_site.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ create_site <- function(path) {

if (!isTRUE(chk$description)) {
fs::file_create(fs::path(path_site(path), "DESCRIPTION"))
check_git_user(path)
create_description(path)
}

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ create_site_readme <- function(path) {

create_description <- function(path) {
yaml <- yaml::read_yaml(path_config(path), eval.expr = FALSE)
the_author <- paste(gert::git_signature_default(path), "[aut, cre]")
the_author <- paste("Jo Carpenter <team@carpentries.org> [aut, cre]")
the_author <- utils::as.person(the_author)
desc <- desc::description$new("!new")
desc$del(c("BugReports", "LazyData"))
Expand Down
9 changes: 9 additions & 0 deletions tests/testthat/test-build_lesson.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ if (rmarkdown::pandoc_available("2.11")) {

pkg <- pkgdown::as_pkgdown(fs::path_dir(sitepath))


test_that("The lesson contact is always team@carpentries.org", {
dsc <- desc::description$new(sub("docs[/]?", "DESCRIPTION", sitepath))
auth <- eval(parse(text = dsc$get_field("Authors@R")))
expect_equal(as.character(auth),
"Jo Carpenter <team@carpentries.org> [aut, cre]")
})


test_that("build_lesson() also builds the extra pages", {
skip_if_not(rmarkdown::pandoc_available("2.11"))
expect_true(fs::dir_exists(sitepath))
Expand Down

0 comments on commit 2110fad

Please sign in to comment.