Skip to content

Commit f389de5

Browse files
authored
PR Dashboard tuning (#18520)
1 parent a3b90cb commit f389de5

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

.github/scripts/pull-request-dashboard.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,20 @@
6666
upstream PR/issue, "reported at <other-repo>", a spec change, or a \
6767
release in another project). Look especially at the latest comments. \
6868
A new PR with no reviews yet is NOT external. CI failing alone is \
69-
NOT external unless an upstream cause is named.
69+
NOT external unless an upstream cause is named. External-looking text \
70+
can become stale: do NOT use "external" when a later author response, \
71+
commit, or approval appears to resolve or supersede the external blocker.
7072
2. AUTHOR — If the latest substantive event is an approver review or \
7173
review-comment with content (a question, suggestion, change \
72-
request, clarification ask, or [APPROVED/CHANGES_REQUESTED] state) \
74+
request, clarification ask, or CHANGES_REQUESTED state) \
7375
and the AUTHOR has not posted any comment, review, or commit AFTER \
7476
it, the AUTHOR should act next. This holds even when the comment \
7577
is just a question or a soft suggestion — the ball is in the \
76-
author's court until they respond. (Note: a *commit* by an approver \
77-
does not count here — that's an approver pushing a fix, not asking \
78-
the author for something.)
78+
author's court until they respond. An APPROVED review means an \
79+
approver/maintainer should act next unless the approval body or inline \
80+
review comments explicitly ask the author to address something before \
81+
merge. (Note: a *commit* by an approver does not count here — that's \
82+
an approver pushing a fix, not asking the author for something.)
7983
3. APPROVER — Otherwise, an APPROVER should act next. This includes: \
8084
fresh PRs with no reviews yet; PRs where the author has posted the \
8185
latest substantive event (comment, review, or commit) addressing \
@@ -623,6 +627,11 @@ def render_context(ctx: dict[str, Any]) -> str:
623627
signals.append("PR is a draft")
624628
if last_role == "author" and ctx["approvers"]:
625629
signals.append("latest substantive activity is from author after approvals")
630+
if last_sub and last_sub.get("kind") == "review:APPROVED":
631+
signals.append(
632+
"latest substantive activity is an APPROVED review; treat as approver/maintainer "
633+
"action unless the approval body or inline review comments ask the author for follow-up"
634+
)
626635
if last_role == "approver" and last_sub:
627636
signals.append("latest substantive activity is from an approver")
628637
lines.append("Pre-computed signals:")

0 commit comments

Comments
 (0)