Skip to content

Commit

Permalink
Map deploymentGroups to session
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Jul 17, 2023
1 parent 4067425 commit a2facdf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,18 @@ convert_deployments_to_0.1.6 <- function(package, from = "1.0-rc.1") {
deployments <- deployments %>%
dplyr::mutate(session = NA)
}
if ("deploymentGroups" %in% names(deployments)) {
# map to session and then remove
deployments <- deployments %>%
dplyr::mutate(session = dplyr::case_when(
is.na(.data$session) ~.data$deploymentGroups,
is.na(.data$deploymentGroups) ~ .data$session,
!is.na(.data$deploymentGroups) & !is.na(.data$session) ~
stringr::str_c(.data$session,
.data$deploymentGroups,
sep = " | "))) %>%
dplyr::select(-"deploymentGroups")
}
if ("array" %in% names(deployments)) {
warning(glue::glue("The field `array` of deployments is deprecated in",
"version {from}.")
Expand Down

0 comments on commit a2facdf

Please sign in to comment.