From 05c0a8eac3a87cd3e5c25a14f8db04b4324489c9 Mon Sep 17 00:00:00 2001 From: Bryan Morgan Date: Mon, 19 Jan 2026 22:05:15 -0500 Subject: [PATCH] fix(workflows): use author_association for maintainer check (#17060) --- .../pr-contribution-guidelines-notifier.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-contribution-guidelines-notifier.yml b/.github/workflows/pr-contribution-guidelines-notifier.yml index c9bebbb3c5..fdabd20f3d 100644 --- a/.github/workflows/pr-contribution-guidelines-notifier.yml +++ b/.github/workflows/pr-contribution-guidelines-notifier.yml @@ -33,19 +33,12 @@ jobs: const repo = context.repo.repo; const username = context.payload.pull_request.user.login; const pr_number = context.payload.pull_request.number; - const team_slug = 'gemini-cli-maintainers'; // 1. Check if the PR author is a maintainer - try { - await github.rest.teams.getMembershipForUserInOrg({ - org, - team_slug, - username, - }); - core.info(`${username} is a maintainer. No notification needed.`); + const authorAssociation = context.payload.pull_request.author_association; + if (['OWNER', 'MEMBER', 'COLLABORATOR'].includes(authorAssociation)) { + core.info(`${username} is a maintainer (Association: ${authorAssociation}). No notification needed.`); return; - } catch (error) { - if (error.status !== 404) throw error; } // 2. Check if the PR is already associated with an issue