Skip to content

Let any requester clear a maintainer block in the label workflow #2026

Closed

Description

@edelauna

Problem

A maintainer re-request of a blocking maintainer does not clear the block. The PR stays awaiting-author.

Context

A maintainer's CHANGES_REQUESTED review is a durable block. Only two events clear it: the PR author re-requests that maintainer, or the maintainer re-requests themselves. If any other person re-requests the blocker, nothing changes.

Example: #1905. taltas requested changes. The author pushed new commits but did not re-request. edelauna then re-requested taltas. The PR stayed awaiting-author, and no CodeRabbit labels appeared.

GitHub lets only the author and people with triage or write access request reviewers. A review_requested event that names the blocker is already a valid signal.

Proposal

  1. Remove the actor check in the review_requested loop (actorLogin !== authorLogin && actorLogin !== requested).
  2. Keep these rules: team requests never clear a block, the request must not be older than the blocking review, a timeline error keeps the block, and review_request_removed never clears a block.
  3. When the block clears and CI passes, the existing flow adds awaiting-coderabbit and coderabbit-review-active. No new label code is needed.
  4. Change the existing test that expects a third-party re-request to keep the block. Add tests for: a third-party re-request, a team request, an older request, and the CodeRabbit labels after the block clears.

Open question

This lets any user with request rights bypass the author. To limit it to maintainers, add a permissionFor check on the actor.

File: .github/workflows/label-pr-review-state.yml. Tests: src/services/__tests__/pr-review-state-workflow.test.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions