Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add autolabeling the guild PRs (#51663)
Lena3d7d2cac4b16
diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.ymlindex cc9c4a9eefd..ce5b5f39e67 100644--- a/.github/workflows/pr_labeler.yml+++ b/.github/workflows/pr_labeler.yml@@ -1,5 +1,6 @@# Labels pull requests by author: 'bot' for bot accounts, 'staff' for-# staff team members, 'first contribution' for first-time external contributors.+# staff team members, 'guild' for guild members, 'first contribution' for+# first-time external contributors.name: PR Labeleron:@@ -29,8 +30,47 @@ jobs:script: |const BOT_LABEL = 'bot';const STAFF_LABEL = 'staff';+ const GUILD_LABEL = 'guild';const FIRST_CONTRIBUTION_LABEL = 'first contribution';const STAFF_TEAM_SLUG = 'staff';+ const GUILD_MEMBERS = [+ '11happy',+ 'AidanV',+ 'AmaanBilwar',+ 'OmChillure',+ 'Palanikannan1437',+ 'Shivansh-25',+ 'SkandaBhat',+ 'TwistingTwists',+ 'YEDASAVG',+ 'Ziqi-Yang',+ 'alanpjohn',+ 'arjunkomath',+ 'austincummings',+ 'ayushk-1801',+ 'claiwe',+ 'criticic',+ 'dongdong867',+ 'emamulandalib',+ 'eureka928',+ 'iam-liam',+ 'iksuddle',+ 'ishaksebsib',+ 'lingyaochu',+ 'marcocondrache',+ 'mchisolm0',+ 'nairadithya',+ 'nihalxkumar',+ 'notJoon',+ 'polyesterswing',+ 'prayanshchh',+ 'razeghi71',+ 'sarmadgulzar',+ 'seanstrom',+ 'th0jensen',+ 'tommyming',+ 'virajbhartiya',+ ];const pr = context.payload.pull_request;const author = pr.user.login;@@ -71,6 +111,17 @@ jobs:return;}+ if (GUILD_MEMBERS.includes(author)) {+ await github.rest.issues.addLabels({+ owner: context.repo.owner,+ repo: context.repo.repo,+ issue_number: pr.number,+ labels: [GUILD_LABEL]+ });+ console.log(`PR #${pr.number} by ${author}: labeled '${GUILD_LABEL}' (guild member)`);+ // No early return: guild members can also get 'first contribution'+ }+// We use inverted logic here due to a suspected GitHub bug where first-time contributors// get 'NONE' instead of 'FIRST_TIME_CONTRIBUTOR' or 'FIRST_TIMER'.// https://github.com/orgs/community/discussions/78038