swarm ui: a pull requests card on the reports tab
The reports tab gets a "pull requests" card under the issue report. It lists
the open PRs of every repo, or of one picked in a repo select, with the
columns a reviewer or merger filters on: author, labels, requested
reviewers, base branch, WIP (the forge's draft flag), approvals against the
base branch's protection rule, has all approvals, conflicts, protected base
and CI. Every column sorts, the small-set columns filter by picking values,
and the browser keeps the filters and the repo. No filter applies at first.
swarm-controller resolves each row so the page makes no calls of its own:
GET /api/pr-report and GET /api/repos/{org}/{repo}/pr-report. The required
approvals come from the first matching branch protection rule (an
unprotected base asks for none); an approval counts when it is the
reviewer's latest decision, on the current head, neither stale nor
dismissed and official.
A free-text table cell gets a minimum width, so a table with many columns
scrolls sideways instead of wrapping a title to a word a line.
This commit is contained in:
parent
7479d7fca7
commit
f633963b77
1 changed files with 1132 additions and 8 deletions
|
|
@ -1,8 +1,9 @@
|
|||
// <ReportsPage> — `/reports`: what the swarm reports about itself, as two
|
||||
// folded cards: the alerts Grafana holds now, and mara's issue report. Neither
|
||||
// reads anything until it is opened.
|
||||
// <ReportsPage> — `/reports`: what the swarm reports about itself, as folded
|
||||
// cards: the alerts Grafana holds now, mara's issue report and the PR report.
|
||||
// None reads anything until it is opened.
|
||||
import { AlertsCard } from "../AlertsPage.js";
|
||||
import { IssueReportCard } from "../IssueReportPage.js";
|
||||
import { PrReportCard } from "../PrReportPage.js";
|
||||
import "./ReportsPage.css";
|
||||
|
||||
export function ReportsPage() {
|
||||
|
|
@ -10,6 +11,7 @@ export function ReportsPage() {
|
|||
<div class="ui-reports-page">
|
||||
<AlertsCard />
|
||||
<IssueReportCard />
|
||||
<PrReportCard />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue