fix(ci): identify team members by repository permission (#8822)

* fix(ci): identify team members by repository permission

`author_association` is computed from what the caller can see, so GITHUB_TOKEN
reports a private organization member as CONTRIBUTOR. Only 5 of GreptimeTeam's
members have public membership, so the open-pull-request check skipped almost
everyone it was written for.

Use the repository permission of the author instead, which is
viewer-independent. On error, apply the limit rather than skipping, so a token
that cannot read permissions cannot silently disable the check again.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* fix(ci): do not log repository permission levels

Job logs are public. Resolving the author's permission is fine; printing the
level is not.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
dennis zhuang
2026-08-10 13:14:56 +00:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent f88226c3ff
commit e2ab11763a
2 changed files with 29 additions and 9 deletions
-1
View File
@@ -44,5 +44,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
MAX_OPEN_PRS: ${{ vars.MAX_OPEN_PRS_PER_AUTHOR || 5 }}