Skip to content

Commit

Permalink
call pkg 'editor_vacation_status' fn in ed table for #7
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 19, 2024
1 parent ecc23b2 commit 1068894
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dashboard
Title: What the Package Does (One Line, Title Case)
Version: 0.0.7.001
Version: 0.0.7.002
Authors@R:
person(given = "First",
family = "Last",
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "dashboard: What the Package Does (One Line, Title Case)",
"codeRepository": "https://github.com/ropensci-review-tools/dashboard",
"license": "https://spdx.org/licenses/MIT",
"version": "0.0.7.1",
"version": "0.0.7.002",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -123,7 +123,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=tidyr"
},
"SystemRequirements": null
"SystemRequirements": {}
},
"fileSize": "41.907KB"
}
23 changes: 1 addition & 22 deletions quarto/editors.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,7 @@ cat (paste0 (


```{r editor-vacation-status, echo = FALSE}
editor_vacation <- airtabler::airtable (
base = "app8dssb6a7PG6Vwj", table = "editor-vacation-status"
)
editor_vacation <- editor_vacation$`editor-vacation-status`$select_all (fields = list ("editor", "Action", "Start Date", "Return Date"))
index <- vapply (editor_vacation$editor, function (i) length (i) > 0L, logical (1L))
edvac <- editor_vacation [which (index), ]
rev_prod <- airtabler::airtable (
base = "app8dssb6a7PG6Vwj", table = "reviewers-prod"
)
rev_prod <- rev_prod$`reviewers-prod`$select_all (fields = list ("github", "name"))
rev_prod <- rev_prod [match (edvac$editor, rev_prod$id), ]
edvac$github <- rev_prod$github
edvac$name <- rev_prod$name
edvac$away <- FALSE
s <- edvac$`Start Date` [2]
index <- (!is.na (edvac$`Start Date`) & is.na (edvac$`Return Date`)) |
as.Date (edvac$`Return Date`) > Sys.Date ()
index [which (is.na (index))] <- FALSE
edvac$away [index] <- TRUE
edvac <- dashboard::editor_vacation_status ()
editors_on_vacation <- edvac$github [which (edvac$away)]
ed_status$status [ed_status$editor %in% editors_on_vacation] <- "ON LEAVE"
```
Expand Down

0 comments on commit 1068894

Please sign in to comment.