Skip to content

Commit 9285db2

Browse files
committed
Split team request lanes
1 parent e5f8986 commit 9285db2

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## ✨ What It Does
1414

15-
- 🧑‍💻 Groups open PRs by requested reviewer, requested team, or no reviewer requested.
15+
- 🧑‍💻 Groups open PRs by requested reviewer, requested GitHub team, or no reviewer requested.
1616
- 🚦 Highlights PR age: green `<7d`, yellow `7-14d`, red `>14d`.
1717
- 🔥 Surfaces aging reviews, oldest PRs per lane, and no-reviewer PRs.
1818
- 🧭 Defaults to `cowprotocol/cowswap`, with searchable repo switching.

app.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,18 +1065,30 @@
10651065
});
10661066
personLanes.sort(sortLanesByUrgency);
10671067
var lanes = personLanes.slice();
1068+
var knownTeamSlugs = new Set(teamOptions.map(function (team) {
1069+
return String(team.slug || "").toLowerCase();
1070+
}));
10681071

1069-
var teamItems = pulls.filter(function (pull) {
1070-
return pullTeamMatches.get(pull.number).length > 0;
1072+
var teamLanes = teamOptions.map(function (team) {
1073+
return createTeamLane(String(team.slug || "").toLowerCase(), pulls, teamOptions, pullTeamMatches, sortMode);
1074+
});
1075+
teamLanes.sort(sortLanesByUrgency);
1076+
lanes = lanes.concat(teamLanes);
1077+
1078+
var unknownTeamItems = pulls.filter(function (pull) {
1079+
return pullTeamMatches.get(pull.number).some(function (team) {
1080+
var slug = String(team.slug || "").toLowerCase();
1081+
return !slug || !knownTeamSlugs.has(slug);
1082+
});
10711083
});
10721084

1073-
if (teamItems.length) {
1085+
if (unknownTeamItems.length) {
10741086
lanes.push(createLaneModel({
10751087
type: "team",
10761088
title: "Team requests",
1077-
subtitle: "requested teams",
1089+
subtitle: "unknown teams",
10781090
avatarUrl: ""
1079-
}, teamItems, sortMode));
1091+
}, unknownTeamItems, sortMode));
10801092
}
10811093

10821094
lanes.push(createUnassignedLane(noTeamReviewer, sortMode));

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1>CoW Triage</h1>
2222
<svg viewBox="0 0 24 24" aria-hidden="true">
2323
<path d="M12 2C6.48 2 2 6.58 2 12.25c0 4.52 2.87 8.36 6.84 9.72.5.1.68-.22.68-.49 0-.24-.01-1.04-.01-1.89-2.78.62-3.37-1.22-3.37-1.22-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.9 1.57 2.35 1.12 2.92.86.09-.67.35-1.12.63-1.38-2.22-.26-4.55-1.14-4.55-5.05 0-1.12.39-2.03 1.03-2.74-.1-.26-.45-1.3.1-2.7 0 0 .84-.27 2.75 1.05A9.33 9.33 0 0 1 12 7.02c.85 0 1.7.12 2.5.35 1.9-1.32 2.74-1.05 2.74-1.05.55 1.4.2 2.44.1 2.7.64.71 1.03 1.62 1.03 2.74 0 3.92-2.34 4.78-4.57 5.04.36.32.68.94.68 1.9 0 1.38-.01 2.49-.01 2.82 0 .27.18.59.69.49A10.08 10.08 0 0 0 22 12.25C22 6.58 17.52 2 12 2Z"></path>
2424
</svg>
25-
<span>v0.2</span>
25+
<span>v0.3</span>
2626
</a>
2727
</div>
2828
<p class="brand-tagline">Open PR review load across CoW Protocol repos.</p>

0 commit comments

Comments
 (0)