From b6b914842f66ba1d5351dffeac7359f23625e2cc Mon Sep 17 00:00:00 2001 From: Mark Keller <7525285+keller-mark@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:28:34 -0400 Subject: [PATCH] Add open issue link to missing papers issue markdown (#502) * Add open issue link * Forgot to redo url-encoding --- scripts/fetch-hidive-zotero-items.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/fetch-hidive-zotero-items.ts b/scripts/fetch-hidive-zotero-items.ts index 1d22daff..b175ae8c 100644 --- a/scripts/fetch-hidive-zotero-items.ts +++ b/scripts/fetch-hidive-zotero-items.ts @@ -394,9 +394,12 @@ function createTodoGitHubIssueContents(missingPapers: Array) { let cid = p.itemType === "preprint" ? HIDIVE_PREPRINTS_COLLECTION_ID : HIDIVE_PUBLICATIONS_COLLECTION_ID; - let link = + let zoteroLink = `https://www.zotero.org/groups/${HIDIVE_GROUP_ID}/hidive/collections/${cid}/items/${p.key}/collection`; - return `- [${p.key}](${link}) - ${p.title}`; + let defaultIssueTitle = encodeURIComponent(`Add paper ${p.key}`); + let openIssueLink = + `https://github.com/hms-dbmi/gehlenborglab-website/issues/new?assignees=&labels=paper-bot&projects=&template=paper.yml&zotero_id=${p.key}&title=${defaultIssueTitle}&members=nils-gehlenborg` + return `- [${p.key}](${zoteroLink}) - [Open issue](${openIssueLink}) - ${p.title}`; } let papers = Array