Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Jan 14, 2025
1 parent 6b3e83a commit 2d078a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion R/api.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ repository_branches <- function(repositories_base_path, url) {
##' query ref :: string
##' state root :: root
report_list <- function(root, ref) {
base <- git_get_default_branch(root)
base <- git_remote_default_branch_ref(root)
reports <- get_reports(root = root, ref = ref, base = base)

data.frame(
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/helper-orderly-runner.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ git_add_and_commit <- function(path, add = ".", message = "new commit") {
}


git_add_and_commit <- function(path, add = ".") {
git_add_and_commit <- function(path, add = ".", message = "new commit") {
gert::git_add(add, repo = path)
user <- "author <author@example.com>"
gert::git_commit("new commit", author = user, committer = user, repo = path)
gert::git_commit(message, author = user, committer = user, repo = path)
}


create_new_commit <- function(path, new_file = "new", add = ".") {
create_new_commit <- function(path, new_file = "new", add = ".", ...) {
writeLines(ids::random_id(), file.path(path, new_file))
git_add_and_commit(path, add)
git_add_and_commit(path, add, ...)
}


Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-reports.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_that("can get list of reports", {
root <- test_prepare_orderly_example(c("data", "parameters"))
helper_add_git(root)

reports <- get_reports(root = root, ref = "HEAD")
expect_setequal(reports$name, c("data", "parameters"))
Expand All @@ -9,7 +8,6 @@ test_that("can get list of reports", {

test_that("report list includes last modification time", {
root <- test_prepare_orderly_example(c("data", "parameters"))
helper_add_git(root)

writeLines("Hello", file.path(root, "src/data/hello.txt"))
writeLines("World", file.path(root, "src/parameters/world.txt"))
Expand Down Expand Up @@ -40,7 +38,6 @@ test_that("report list includes last modification time", {

test_that("report list includes modification status", {
root <- test_prepare_orderly_example(c("data", "parameters"))
helper_add_git(root)

writeLines("Hello", file.path(root, "src/data/hello.txt"))
git_add_and_commit(root)
Expand Down

0 comments on commit 2d078a4

Please sign in to comment.