Commit Graph

3 Commits

Author SHA1 Message Date
dennis zhuang f27f27da66 fix(ci): grant pull-requests write and stop counting drafts (#8844)
Posting to `/issues/{n}/comments` is authorized against the target object, and
that object is a pull request, so `issues: write` alone is refused with 403 and
the warning comment never lands.

Drafts are no longer counted and no longer warned about. `ready_for_review` is
added to the trigger types so that opening as a draft and flipping it to ready
still goes through the check.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-08-11 07:59:12 +00:00
dennis zhuang e2ab11763a 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>
2026-08-10 13:14:56 +00:00
dennis zhuang 42c94211a2 chore(ci): warn when a member has too many open pull requests (#8813)
* chore(ci): warn when a member has too many open pull requests

Review capacity is the bottleneck. Add a `pull_request_target` workflow that
counts an org member's open pull requests (drafts included) on open/reopen and
posts a warning comment when the count exceeds the limit.

Advisory only for now: nothing is closed and no check fails.

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

* chore(ci): address review on the pr-open-limit workflow

- Only match marker comments authored by the Actions bot; a marker pasted
  by anyone else would otherwise be picked up and fail the edit with 403.
- Validate MAX_OPEN_PRS and fall back to 5 on a non-numeric variable.
- Drop pull-requests write permission; commenting goes through the issues API.
- continue-on-error so a script failure never marks the pull request red.

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

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-08-10 04:35:20 +00:00