fix(workflow): update maintainer check logic to be inclusive and case-insensitive (#18009)

This commit is contained in:
Bryan Morgan
2026-01-30 22:32:58 -05:00
committed by GitHub
parent 7469ea0fca
commit b0f38104d7

View File

@@ -48,14 +48,15 @@ jobs:
org: context.repo.owner, org: context.repo.owner,
team_slug: 'gemini-cli-maintainers' team_slug: 'gemini-cli-maintainers'
}); });
maintainerLogins = new Set(members.map(m => m.login)); maintainerLogins = new Set(members.map(m => m.login.toLowerCase()));
} catch (e) { } catch (e) {
core.warning('Failed to fetch team members'); core.warning('Failed to fetch team members');
} }
const isMaintainer = (login, assoc) => { const isMaintainer = (login, assoc) => {
if (maintainerLogins.size > 0) return maintainerLogins.has(login); const isTeamMember = maintainerLogins.has(login.toLowerCase());
return ['OWNER', 'MEMBER', 'COLLABORATOR'].includes(assoc); const isRepoMaintainer = ['OWNER', 'MEMBER', 'COLLABORATOR'].includes(assoc);
return isTeamMember || isRepoMaintainer;
}; };
// 2. Determine which PRs to check // 2. Determine which PRs to check