Skip to content

Commit

Permalink
Update update-authorized-users.yaml (#50)
Browse files Browse the repository at this point in the history
* Update update-authorized-users.yaml

* add colon

* add text file

* fix typo
  • Loading branch information
sbidari authored Nov 20, 2024
1 parent 1987db9 commit 69167c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-authorized-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions auxiliary-data/authorized_users.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 3 additions & 4 deletions src/code/get_authorized_users.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

hub_path <- "."
output_path <- "auxiliary-data/"

Expand All @@ -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
)

Expand All @@ -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"))
writeLines(output, file.path(output_path, "authorized_users.txt"))

0 comments on commit 69167c9

Please sign in to comment.