diff --git a/.github/workflows/update-authorized-users.yaml b/.github/workflows/update-authorized-users.yaml index e7802cb..ad49442 100644 --- a/.github/workflows/update-authorized-users.yaml +++ b/.github/workflows/update-authorized-users.yaml @@ -33,7 +33,7 @@ jobs: - name: Check for Changes id: check_diff run: | - git diff --exit-code auxiliary-data/authorized_users.txt || echo "changed=true" >> $GITHUB_ENV + git diff --exit-code auxiliary-data/authorized_users.txt || { echo "changed=true" | tee -a $GITHUB_ENV; } - name: Commit changes if: env.changed == 'true' diff --git a/auxiliary-data/authorized_users.txt b/auxiliary-data/authorized_users.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/auxiliary-data/authorized_users.txt @@ -0,0 +1 @@ + diff --git a/src/code/get_authorized_users.r b/src/code/get_authorized_users.r index a9cb5c2..42756dc 100644 --- a/src/code/get_authorized_users.r +++ b/src/code/get_authorized_users.r @@ -1,4 +1,3 @@ - hub_path <- "." output_path <- "auxiliary-data/" @@ -13,8 +12,8 @@ extract_metadata <- function(file) { "model_abbr" %in% names(yml_data), yml_data$model_abbr, NA ) designated_user <- ifelse( - "designated_github_user" %in% names(yml_data), - paste(yml_data$designated_github_user, collapse = ", "), + "designated_github_users" %in% names(yml_data), + paste(yml_data$designated_github_users, collapse = ", "), NA ) @@ -33,4 +32,4 @@ output <- glue::glue( "{data_df$team_name}-{data_df$model_name} {data_df$designated_users}" ) -writeLines(output, file.path(output_path, "authorized_users.txt")) \ No newline at end of file +writeLines(output, file.path(output_path, "authorized_users.txt"))