@@ -42,20 +42,46 @@ jobs:
4242 "agunapal", "SamGondelman", "Ninja91", "ivayloen", "DrJessop", "rodrigos01meta", "akrieger", "cmt0", "yiming0416",
4343 "ethansfng", "ThomasJannaud", "nirvanagth", "marcinkwiatkowski", "3l1", "omerjerk", "nitish2112", "yipjustin",
4444 "ejnguyen", "andrewor14", "phaiting", "mgiordy", "LeeOHzzZ", "adicatana", "Polyomino", "ezrilow", "navsud",
45- "michaelmaitland", "RahulC7", "seyeong-han", "thdusdl1219", "YifanShenSZ ", "RdoubleA ", "Olivia-liu ", "Abhi-hpp ",
46- "Vysarat", "azad-meta", "junpi", "pytorchbot", "pytorchmergebot", "pytorchupdatebot", "facebook-github-bot ",
47- "app/dependabot", "Erik-Lundell", "zingo", "AdrianLundell", "oscarandersson8218", "per", "Sebastian-Larsson", "SaoirseARM ",
48- "robell", "mansnils", "martinlsm", "freddan80", "YufengShi-dudu", "tom-arm", "perheld", "Jerry-Ge", "gggekov", "fumchin ",
49- "wwwind", "benkli01", "Tessil", "maddun01", "Michiel-Olieslagers", "armwaheed", "agrima1304", "emmakujala", "annietllnd ",
50- "MatthiasHertel80", "AlexTawseArm", "jmahbs", "morgolock", "Christoffer-JL", "ArmRyan", "xingguo01", "tgonzalezorlandoarm ",
51- "haowhsu-quic ", "shewu-quic ", "winskuo-quic ", "chunit -quic", "DannyYuyang -quic", "chuntl ", "thchenqti ", "jethroqti ",
52- "chenweng-quic", "cymbalrush", "DenisVieriu97", "billmguo", "StrycekSimon", "jirioc", "robert-kalmar", "skywall ",
53- "MartinPavella", "roman-janik-nxp", "novak-vaclav", "neuropilot-captain", "dijopaul", "cad-rlc", "cad-audio", "ynimmaga ",
54- "daniil-lyakhov", "emmanuel-ferdman", "cavusmustafa", "anzr299", "Jiseong-oh", "alexdean08",
45+ "michaelmaitland", "RahulC7", "seyeong-han", "thdusdl1219", "jaejunku ", "felixweilbach ", "apullin ", "trviv", "YifanShenSZ ",
46+ "RdoubleA", "Olivia-liu", "Abhi-hpp", " Vysarat", "azad-meta", "junpi", "pytorchbot", "pytorchmergebot", "pytorchupdatebot",
47+ "facebook-github-bot", " app/dependabot", "Erik-Lundell", "zingo", "AdrianLundell", "oscarandersson8218", "per", "Sebastian-Larsson",
48+ "SaoirseARM", " robell", "mansnils", "martinlsm", "freddan80", "YufengShi-dudu", "tom-arm", "perheld", "Jerry-Ge", "gggekov",
49+ "fumchin", " wwwind", "benkli01", "Tessil", "maddun01", "Michiel-Olieslagers", "armwaheed", "agrima1304", "emmakujala",
50+ "annietllnd", " MatthiasHertel80", "AlexTawseArm", "jmahbs", "morgolock", "Christoffer-JL", "ArmRyan", "xingguo01",
51+ "tgonzalezorlandoarm ", "chizkiyahu ", "sarah-blades ", "haowhsu -quic", "shewu -quic", "winskuo-quic ", "chunit-quic ", "DannyYuyang-quic ",
52+ "chuntl", "thchenqti", "jethroqti", " chenweng-quic", "cymbalrush", "DenisVieriu97", "billmguo", "StrycekSimon", "jirioc", "robert-kalmar",
53+ "skywall", " MartinPavella", "roman-janik-nxp", "novak-vaclav", "neuropilot-captain", "dijopaul", "cad-rlc", "cad-audio",
54+ "ynimmaga", " daniil-lyakhov", "emmanuel-ferdman", "cavusmustafa", "anzr299", "Jiseong-oh", "alexdean08",
5555 // explicitly include the dependabot bot login seen in PRs
5656 "dependabot[bot]"
5757 ]);
5858
59+ // List of organization logins (lowercased) to exclude members of
60+ const excludedOrgs = new Set([
61+ "meta", "facebook", "pytorch", "arm", "apple", "qualcomm", "nxp", "mediatek", "cadence", "intel", "samsung"
62+ ]);
63+
64+ // Simple cache for user -> boolean (member of excluded org)
65+ const orgsCache = new Map();
66+
67+ async function isMemberOfExcludedOrg(user) {
68+ if (!user || !user.login) return false;
69+ const login = user.login;
70+ if (orgsCache.has(login)) return orgsCache.get(login);
71+ try {
72+ const response = await github.rest.orgs.listForUser({ username: login });
73+ const orgs = response && response.data ? response.data : [];
74+ const isMember = orgs.some(o => o && o.login && excludedOrgs.has(o.login.toLowerCase()));
75+ orgsCache.set(login, isMember);
76+ return isMember;
77+ } catch (error) {
78+ // If checking orgs fails (rate limit, permissions etc.), assume not a member to avoid false positives.
79+ console.log(`Error checking orgs for ${login}: ${error.message}`);
80+ orgsCache.set(login, false);
81+ return false;
82+ }
83+ }
84+
5985 function isBotOrExcluded(user) {
6086 if (!user) return false;
6187 // GitHub sometimes marks bots with user.type === "Bot"
0 commit comments