Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion grafana/dashboards/maintainer-reviews.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tags": ["gittensory", "maintainer"],
"timezone": "browser",
"schemaVersion": 39,
"version": 4,
"version": 5,
"editable": false,
"graphTooltip": 1,
"refresh": "1m",
Expand Down Expand Up @@ -54,6 +54,7 @@
"type": "stat",
"id": 5,
"title": "Manual review",
"description": "Counts PRs whose most recent status update falls in this window AND is currently 'manual' -- a live snapshot, not a lifetime tally. A PR that entered manual review earlier in the window and was later merged or closed (also within the window) is counted only once, under Merged or Closed, not here. If you actively resolve your manual-review queue, this number will read lower than your felt sense of how many PRs passed through manual review.",
"datasource": { "type": "frser-sqlite-datasource", "uid": "gittensory-db" },
"gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 },
"fieldConfig": { "defaults": { "color": { "mode": "fixed", "fixedColor": "orange" }, "unit": "short" }, "overrides": [] },
Expand All @@ -64,6 +65,7 @@
"type": "stat",
"id": 6,
"title": "Commented (advisory)",
"description": "Counts PRs whose most recent status update falls in this window AND is currently 'commented' -- the same in-window-latest-state semantics as 'Manual review'. A PR that was commented on and later merged or closed within the same window shows only under Merged/Closed, so this under-reports total advisory-comment activity for anyone who resolves their queue promptly.",
"datasource": { "type": "frser-sqlite-datasource", "uid": "gittensory-db" },
"gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 },
"fieldConfig": { "defaults": { "color": { "mode": "fixed", "fixedColor": "blue" }, "unit": "short" }, "overrides": [] },
Expand All @@ -74,6 +76,7 @@
"type": "stat",
"id": 7,
"title": "Ignored",
"description": "Counts PRs whose most recent status update falls in this window AND is currently 'ignored' -- the same in-window-latest-state semantics as 'Manual review'. If a PR's status changes again later in the same window (e.g. re-triaged into manual/commented/merged/closed), it moves out of this count entirely rather than accumulating, so this does not track how many times a PR was ever ignored.",
"datasource": { "type": "frser-sqlite-datasource", "uid": "gittensory-db" },
"gridPos": { "h": 4, "w": 4, "x": 20, "y": 1 },
"fieldConfig": { "defaults": { "color": { "mode": "fixed", "fixedColor": "purple" }, "unit": "short" }, "overrides": [] },
Expand Down
17 changes: 17 additions & 0 deletions test/unit/selfhost-grafana-dashboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type DashboardTarget = {
type DashboardPanel = {
id?: number;
title?: string;
description?: string;
targets?: DashboardTarget[];
};

Expand Down Expand Up @@ -254,6 +255,22 @@ describe("maintainer Reviews & PRs Grafana dashboard", () => {
}
});

it("explains the latest-update-in-window (not lifetime) semantics on Manual/Commented/Ignored (#3717)", () => {
const dashboard = readDashboard();
const panelsById = new Map(dashboard.panels.map((panel) => [panel.id, panel]));

for (const [id, title] of [
[5, "Manual review"],
[6, "Commented (advisory)"],
[7, "Ignored"],
] as const) {
const panel = panelsById.get(id);
expect(panel?.title).toBe(title);
expect(panel?.description?.length ?? 0).toBeGreaterThan(0);
expect(panel?.description).toContain("window");
}
});

(sqliteCliAvailable ? it : it.skip)("filters the pull request table to the selected time window", () => {
const root = tmpRoot();
const db = join(root, "reporting.sqlite");
Expand Down
Loading