From 7b8a87b61cf0590cf06735b1e5add247fc53cc3b Mon Sep 17 00:00:00 2001 From: Joseph T Lyons Date: Thu, 8 Aug 2024 16:26:45 -0400 Subject: [PATCH] Filter out staff members from thanks line --- script/get-preview-channel-changes | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/script/get-preview-channel-changes b/script/get-preview-channel-changes index 6dfc6061beb24ae55f2d1189fff44a729c5fd936..df13959e72f1b532b145e289026472c596895307 100755 --- a/script/get-preview-channel-changes +++ b/script/get-preview-channel-changes @@ -9,6 +9,27 @@ const PULL_REQUEST_API_URL = "https://api.github.com/repos/zed-industries/zed/pulls"; const DIVIDER = "-".repeat(80); +// Maintain list manually, as our GitHub organization has community members in it. +const STAFF_MEMBERS = new Set([ + "as-cii", + "bennetbo", + "ConradIrwin", + "danilobleal", + "iamnbutler", + "JosephTLyons", + "jvmncs", + "maxbrunsfeld", + "maxdeviant", + "mikayla-maki", + "nathansobo", + "notpeter", + "osiewicz", + "rgbkrk", + "rtfeldman", + "SomeoneToIgnore", + "thorstenball", +]); + main(); async function main() { @@ -74,8 +95,11 @@ async function main() { } let credit = getCreditString(pullRequestNumber, contributor); + const isStaff = STAFF_MEMBERS.has(contributor); + contributor = isStaff ? `${contributor} (staff)` : contributor; console.log(`PR Title: ${pullRequest.title}`); + console.log(`Contributor: ${contributor}`); console.log(`Credit: (${credit})`); console.log("Release Notes:"); @@ -94,7 +118,7 @@ function getCreditString(pullRequestNumber, contributor) { credit += pullRequestMarkdownLink; } - if (contributor) { + if (contributor && !STAFF_MEMBERS.has(contributor)) { const contributorMarkdownLink = `[${contributor}](${GITHUB_URL}/${contributor})`; credit += `; thanks ${contributorMarkdownLink}`; }