Skip to content

Commit ba6f7eb

Browse files
Merge pull request #42 from fhdsl/ITN
ITN
2 parents 3a22f66 + 778fc06 commit ba6f7eb

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/build-collection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
Rscript --vanilla "scripts/query_collection.R" --git_pat "$GH_PAT"
7070
7171
- name: Archive collection
72-
uses: actions/upload-artifact@v2
72+
uses: actions/upload-artifact@v4.6.2
7373
with:
7474
name: collection
7575
path: resources/collection.tsv

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
with:
8181
check_type: spelling
8282
error_min: 3
83-
gh_pat: secrets.GH_PAT
83+
gh_pat: ${{ secrets.GH_PAT }}
8484

8585
url-check:
8686
name: Check URLs
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
check_type: urls
9292
error_min: 0
93-
gh_pat: secrets.GH_PAT
93+
gh_pat: ${{ secrets.GH_PAT }}
9494

9595
render-preview:
9696
name: Render preview

resources/images/ITNlogo.png

30 KB
Loading

scripts/query_collection.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ for (page in 1:last){
5656
jsonlite::fromJSON(httr::content(req, as = "text"), flatten = TRUE)
5757
message(paste("... Gathered", nrow(repo_dat$items), "repositories."))
5858

59-
repo_dat$items$funding <- lapply(repo_dat$items$topics, function(x) x[x %in% c("anvil", "itn", "daseh", "gdscn", "hutch-course")])
59+
repo_dat$items$funding <- lapply(repo_dat$items$topics, function(x) x[x %in% c("anvil", "itn-course", "daseh", "gdscn", "hutch-course")])
6060
repo_dat$items$funding <- lapply(repo_dat$items$funding, function(x) replace(x, rlang::is_empty(x), NA) )
6161

6262
repo_df <-

scripts/render_collection.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ make_collection_table <- function(exclude = NULL, include = NULL, kable = FALSE)
6161
),
6262
TRUE ~ funding
6363
)) %>%
64+
mutate(funding = case_when(
65+
stringr::str_detect(funding, "itn-course") ~ paste0(
66+
funding,
67+
'<a href =\"https://www.itcrtraining.org/\" target=\"_blank\"<div title =\"About ITN\"></div><img src=\"https://raw.githubusercontent.com/fhdsl/DaSL_Collection/main/resources/images/ITNlogo.png\" height=\"40\"></img><p class=\"image-name\">ITN</p></a>'
68+
),
69+
TRUE ~ funding
70+
)) %>%
71+
6472
mutate(funding = gsub("^.*?<a href", "<a href", funding)) # trim any leading funding sources
6573

6674
# Rename and clip unnecessary columns

0 commit comments

Comments
 (0)