From db5332d5f33957423eefc6d0155fffd3e2da1a07 Mon Sep 17 00:00:00 2001 From: enyst Date: Mon, 18 May 2026 14:44:45 +0000 Subject: [PATCH 1/2] fix(workflows): skip approved PRs in review reminders Clarify the assign-reviews prompt so reviewer reminder comments skip PRs that already have a human approval, even if another reviewer is still requested. Mirror the same wording in the example workflow template. Co-authored-by: openhands --- .github/workflows/assign-reviews.yml | 10 ++++++++-- .../01_basic_action/assign-reviews.yml | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/assign-reviews.yml b/.github/workflows/assign-reviews.yml index 47d025c1da..f1e48f83db 100644 --- a/.github/workflows/assign-reviews.yml +++ b/.github/workflows/assign-reviews.yml @@ -69,12 +69,18 @@ jobs: # Need Reviewer Action Find all open PRs where: - 1. The PR is waiting for review (there are no open review comments or change requests) + 1. The PR is still waiting on its currently requested reviewers or teams: + - Fetch submitted reviews: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews + - Collapse them to each reviewer's latest state + - If any HUMAN reviewer's latest state is APPROVED, SKIP the PR entirely + - Ignore approvals from automation/bot accounts when deciding whether a human has approved + - Also skip if there are open review comments, unresolved review threads, or any latest CHANGES_REQUESTED review + - Example: if @alice approved and @bob is still requested, do NOT ping @bob 2. The PR is in a "clean" state (CI passing, no merge conflicts) 3. The PR is not marked as draft (draft: false) 4. The PR has had no activity (comments, commits, reviews) for more than 3 days. - In this case, send a message to the reviewers: + In this case, send a message only to the currently requested reviewers or teams: [Automatic Post]: This PR seems to be currently waiting for review. {reviewer_names}, could you please take a look when you have a chance? diff --git a/examples/03_github_workflows/01_basic_action/assign-reviews.yml b/examples/03_github_workflows/01_basic_action/assign-reviews.yml index 9df600e2b6..a40118400a 100644 --- a/examples/03_github_workflows/01_basic_action/assign-reviews.yml +++ b/examples/03_github_workflows/01_basic_action/assign-reviews.yml @@ -71,12 +71,18 @@ jobs: # Need Reviewer Action Find all open PRs where: - 1. The PR is waiting for review (there are no open review comments or change requests) + 1. The PR is still waiting on its currently requested reviewers or teams: + - Fetch submitted reviews: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews + - Collapse them to each reviewer's latest state + - If any HUMAN reviewer's latest state is APPROVED, SKIP the PR entirely + - Ignore approvals from automation/bot accounts when deciding whether a human has approved + - Also skip if there are open review comments, unresolved review threads, or any latest CHANGES_REQUESTED review + - Example: if @alice approved and @bob is still requested, do NOT ping @bob 2. The PR is in a "clean" state (CI passing, no merge conflicts) 3. The PR is not marked as draft (draft: false) 4. The PR has had no activity (comments, commits, reviews) for more than 3 days. - In this case, send a message to the reviewers: + In this case, send a message only to the currently requested reviewers or teams: [Automatic Post]: This PR seems to be currently waiting for review. {reviewer_names}, could you please take a look when you have a chance? From 56905bd9396811e41fe13eb4cd8fc164853b6fe8 Mon Sep 17 00:00:00 2001 From: enyst Date: Mon, 18 May 2026 14:55:12 +0000 Subject: [PATCH 2/2] fix(workflows): simplify approved-review guard Replace the broader assign-reviews prompt rewrite with a small note that reviewer reminders only apply when no human reviewer has already approved the PR. Co-authored-by: openhands --- .github/workflows/assign-reviews.yml | 11 +++-------- .../01_basic_action/assign-reviews.yml | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/assign-reviews.yml b/.github/workflows/assign-reviews.yml index f1e48f83db..5064d7e5c1 100644 --- a/.github/workflows/assign-reviews.yml +++ b/.github/workflows/assign-reviews.yml @@ -69,18 +69,13 @@ jobs: # Need Reviewer Action Find all open PRs where: - 1. The PR is still waiting on its currently requested reviewers or teams: - - Fetch submitted reviews: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews - - Collapse them to each reviewer's latest state - - If any HUMAN reviewer's latest state is APPROVED, SKIP the PR entirely - - Ignore approvals from automation/bot accounts when deciding whether a human has approved - - Also skip if there are open review comments, unresolved review threads, or any latest CHANGES_REQUESTED review - - Example: if @alice approved and @bob is still requested, do NOT ping @bob + 1. The PR is waiting for review (there are no open review comments or change requests, and no human reviewer's latest submitted review is + APPROVED; ignore approvals from automation/bot accounts for this check) 2. The PR is in a "clean" state (CI passing, no merge conflicts) 3. The PR is not marked as draft (draft: false) 4. The PR has had no activity (comments, commits, reviews) for more than 3 days. - In this case, send a message only to the currently requested reviewers or teams: + In this case, send a message to the reviewers: [Automatic Post]: This PR seems to be currently waiting for review. {reviewer_names}, could you please take a look when you have a chance? diff --git a/examples/03_github_workflows/01_basic_action/assign-reviews.yml b/examples/03_github_workflows/01_basic_action/assign-reviews.yml index a40118400a..8b7d9527a4 100644 --- a/examples/03_github_workflows/01_basic_action/assign-reviews.yml +++ b/examples/03_github_workflows/01_basic_action/assign-reviews.yml @@ -71,18 +71,13 @@ jobs: # Need Reviewer Action Find all open PRs where: - 1. The PR is still waiting on its currently requested reviewers or teams: - - Fetch submitted reviews: GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews - - Collapse them to each reviewer's latest state - - If any HUMAN reviewer's latest state is APPROVED, SKIP the PR entirely - - Ignore approvals from automation/bot accounts when deciding whether a human has approved - - Also skip if there are open review comments, unresolved review threads, or any latest CHANGES_REQUESTED review - - Example: if @alice approved and @bob is still requested, do NOT ping @bob + 1. The PR is waiting for review (there are no open review comments or change requests, and no human reviewer's latest submitted review is + APPROVED; ignore approvals from automation/bot accounts for this check) 2. The PR is in a "clean" state (CI passing, no merge conflicts) 3. The PR is not marked as draft (draft: false) 4. The PR has had no activity (comments, commits, reviews) for more than 3 days. - In this case, send a message only to the currently requested reviewers or teams: + In this case, send a message to the reviewers: [Automatic Post]: This PR seems to be currently waiting for review. {reviewer_names}, could you please take a look when you have a chance?