mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
Filter out staff members from thanks line
This commit is contained in:
parent
b28507d2e0
commit
b7d6b0a096
1 changed files with 25 additions and 1 deletions
|
@ -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}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue