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