Skip to content

Add PR Review SLA Tracking#983

Draft
jgheithcock wants to merge 2 commits intomasterfrom
feature/review-bot-sla
Draft

Add PR Review SLA Tracking#983
jgheithcock wants to merge 2 commits intomasterfrom
feature/review-bot-sla

Conversation

@jgheithcock
Copy link

@jgheithcock jgheithcock commented Mar 20, 2026

Summary

Per-user review due dates in /github todo and daily reminder DMs. When a review target is configured, each item under "Review Requests" shows how many days remain or how many days overdue the review is. The SLA clock starts when the reviewer was requested (from the existing pull_request webhook), falling back to PR open date for reviews requested before the plugin was installed.

Color-coded review counter in the left sidebar. When a review target is configured, the review button in the sidebar is color-coded:

  • Default color — no pending reviews (nothing to act on).
  • Green — reviews exist but are all within the SLA window (action needed, but on track).
  • Red — one or more reviews are past SLA (overdue, needs attention).

When the review target is set to 0 (disabled), the button always uses its default styling.

Daily overdue digest posted to a channel. Once per day (shortly after midnight, server local time), the plugin posts a single aggregated message to a configured channel listing all overdue reviews across all connected users, grouped by days overdue (most overdue first):

### Pull request reviews past SLA

#### 7 days overdue
- joeuser - mattermost/mattermost-mobile : [MM-67919]: Load original file URL for GIF…

#### 4 days overdue
- janeuser - mattermost/server : Fix race condition in websocket handler
- anotheruser - mattermost/webapp : Update deprecated React lifecycle methods

The digest is cluster-safe (mutex + KV deduplication) and posts at most once per calendar day even with multiple app nodes.


Admin setup

Two new settings appear in System Console > Plugins > GitHub:

Setting Type Default Description
PR review target (days) Number 0 (disabled) Calendar days from review request until a review is considered due. Set to 0 to disable all SLA features.
Post overdue review alerts to channel (ID) Text Empty Channel ID for the daily overdue digest. Leave blank to disable the channel post.

To enable:

  1. Go to System Console > Plugins > GitHub.
  2. Set PR review target (days) to your team's target (e.g. 3).
  3. (Optional) To get the daily digest, paste a channel ID into Post overdue review alerts to channel. You can find the channel ID from the channel's View Info menu. Make sure the GitHub bot user is a member of that channel.
  4. Save. No restart required — the background scheduler picks up changes automatically.

No webhook or GitHub-side configuration changes are needed beyond the plugin's existing setup.

- System Console: optional review target (days) and overdue alert channel ID
- /github todo and daily reminder: per-review due/overdue from PR open date
- Left sidebar: color review counter when SLA enabled (clear vs overdue)
- Post to configured channel once per user/day on daily reminder when overdue
- Handle KV read errors for overdue dedupe; unit tests for SLA math
@jgheithcock jgheithcock requested a review from jwilander March 20, 2026 00:10
@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1562c856-8668-4031-9328-88b598b209f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/review-bot-sla
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@jgheithcock
Copy link
Author

Note, I've not been able to test this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant