Nudge idle community MR authors only when it is their turn
What does this MR do and why?
Second of three stacked MRs reworking the post-creation lifecycle for community contribution MRs (labels -> nudge -> close). This one makes the idle-author nudge court-aware:
- New
MrCourtHelperdecides whether the ball is in the contributor's court, reading the reviewer review-state,detailed_merge_status, and head pipeline. Merge status and pipeline status both come from a single fresh merge-request call, so it stays accurate for idle MRs (the list value can be stale). ping-inactive-authortriggers on theidlelabel +authors_court?, only nudging when it is genuinely the author's turn. When an MR is waiting on a reviewer (unreviewed, or approved and mergeable) it stays quiet and the reviewer-ping automation handles it, so we do not double-ping.- The nudge surfaces every applicable reason in one comment, a lead "state it, can you...?" ask plus a short parenthetical for the rest, instead of picking a single reason. Reasons, blocker-first:
draft(standalone),conflict,ci_failing,changes_requested,no_review_requested. A draft is a standalone "mark it ready" nudge. The footer keeps the contributor-platform review-request link and@gitlab-bot readyas a backup. - CI wording stays neutral ("can you take a look?"), since a failing pipeline is not necessarily the author's fault.
@GitLabDuois ignored as a reviewer, and its review state is ignored too, so an AI-bot review never triggers a nudge.- Runs daily with a 7-day guard (skips any MR nudged in the last 7 days), so an author is not nudged more than about once a week.
Dropped discussions_unresolved as an author reason: an unresolved thread does not tell us whose court it is (it may be a reviewer or maintainer thread, and a contributor may not be able to resolve it), and changes_requested already covers the real "author needs to act on feedback" case.
Depends on !4076 (merged) (merged). MR 3 (auto-close) follows. Related to gitlab-org/developer-relations/contributor-success/team-task#1226 (closed)
Expected impact & dry-runs
- The nudge fires on a smaller, more accurate set: only idle community MRs where the contributor has the next action. MRs waiting on a reviewer are left to the reviewer-ping automation.
- Validated end-to-end on local GDK across the court states: draft (standalone), no-reviewer, CI-failing, changes-requested, conflict, and multi-reason blends (both conflict-led and CI-led); silent on reviewer-unreviewed and approved. GitLabDuo-only (and Duo requested-changes) correctly treated as no human review. The 7-day guard both suppresses and, after 7 days, re-allows a nudge.
- Org-wide
dry-run:customongroups/9970(read-only): 113 of 143 idle community MRs would nudge (the other 30 are waiting on a reviewer). Lead-reason breakdown: pipeline failing 50, draft 27, not sent for review 23, review feedback 11, conflict 2; 34 of the 113 surface more than one reason.
Action items
- Share the messaging in #mr-coaching for feedback on the wording.
Edited by Sina Abadi