Skip to content

Commit 4965c50

Browse files
committed
docs(reviewer-bot): document /rectify command usage
1 parent 80e0999 commit 4965c50

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

REVIEWING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,30 @@ Use this to release your assignment from an issue/PR without automatically assig
7474
@guidelines-bot /release Need to focus on other priorities
7575
```
7676

77+
### Rectify Review State
78+
79+
```
80+
@guidelines-bot /rectify
81+
```
82+
83+
Use this when GitHub review activity and reviewer-bot state appear out of sync.
84+
This is most common on cross-repository PRs where a review event may not have had
85+
permission to persist reviewer-bot state.
86+
87+
Who can run it:
88+
- The currently assigned reviewer
89+
- A maintainer with triage+ permission
90+
91+
What it does (for the current PR only):
92+
- If the latest review by the assigned reviewer is `APPROVED`, it marks the review complete.
93+
- If the latest review by the assigned reviewer is `COMMENTED` or `CHANGES_REQUESTED`, it refreshes reviewer activity.
94+
- Otherwise, it reports that no reconciliation transition applies.
95+
96+
**Example:**
97+
```
98+
@guidelines-bot /rectify
99+
```
100+
77101
### Assign a Specific Reviewer
78102

79103
```
@@ -159,6 +183,7 @@ Life happens! Any of these actions will reset the 14-day clock:
159183
- **Post a review comment** - Any substantive feedback counts
160184
- **Use `/pass [reason]`** - Pass the review to the next person if you can't review it
161185
- **Use `/away YYYY-MM-DD [reason]`** - Step away temporarily (e.g., "On vacation until 2025-02-15")
186+
- **Use `/rectify`** - Reconcile PR review state when review activity happened but bot state is stale
162187

163188
#### Before You Pass: Consider the Learning Opportunity
164189

scripts/reviewer_bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ def get_issue_guidance(reviewer: str, issue_author: str) -> str:
681681
682682
Other commands:
683683
- `{BOT_MENTION} /claim` - Claim this review for yourself
684+
- `{BOT_MENTION} /rectify` - Reconcile this issue/PR review state from GitHub
684685
- `{BOT_MENTION} /label +label-name` - Add a label
685686
- `{BOT_MENTION} /label -label-name` - Remove a label
686687
- `{BOT_MENTION} /queue` - Show reviewer queue
@@ -716,6 +717,7 @@ def get_fls_audit_guidance(reviewer: str, issue_author: str) -> str:
716717
717718
Other commands:
718719
- `{BOT_MENTION} /claim` - Claim this review for yourself
720+
- `{BOT_MENTION} /rectify` - Reconcile this issue/PR review state from GitHub
719721
- `{BOT_MENTION} /label +label-name` - Add a label
720722
- `{BOT_MENTION} /label -label-name` - Remove a label
721723
- `{BOT_MENTION} /queue` - Show reviewer queue
@@ -759,6 +761,7 @@ def get_pr_guidance(reviewer: str, pr_author: str) -> str:
759761
760762
Other commands:
761763
- `{BOT_MENTION} /claim` - Claim this review for yourself
764+
- `{BOT_MENTION} /rectify` - Reconcile this issue/PR review state from GitHub
762765
- `{BOT_MENTION} /label +label-name` - Add a label
763766
- `{BOT_MENTION} /label -label-name` - Remove a label
764767
- `{BOT_MENTION} /queue` - Show reviewer queue

0 commit comments

Comments
 (0)