swarm ui: sort every pull requests column, and read a protection rule as the forge does
The labels and reviewers columns had no sort, so "every column sorts" was
false; both now sort on their joined text.
A branch protection rule's name is a glob the forge compiles with `/` as its
separator, which also takes `?`, `[a-z]`, `[!a-z]`, `{a,b}` and a backslash
escape. The report read only `*` and `**`, so a rule such as `{main,release}`
matched nothing and its PRs showed as protected by no rule, needing no
approvals. It now reads all of them.
This commit is contained in:
parent
560afef2b6
commit
5633107b32
1 changed files with 161 additions and 16 deletions
|
|
@ -81,6 +81,7 @@ const COLUMNS: TableColumn<PrReportRow>[] = [
|
|||
key: "labels",
|
||||
header: "labels",
|
||||
render: (r) => (r.labels.length ? r.labels.join(", ") : "—"),
|
||||
sortBy: (r) => r.labels.join(", "),
|
||||
filterValues: (r) => r.labels,
|
||||
filterMode: "multiselect",
|
||||
},
|
||||
|
|
@ -89,6 +90,7 @@ const COLUMNS: TableColumn<PrReportRow>[] = [
|
|||
header: "reviewers",
|
||||
render: (r) =>
|
||||
r.requested_reviewers.length ? r.requested_reviewers.join(", ") : "—",
|
||||
sortBy: (r) => r.requested_reviewers.join(", "),
|
||||
filterValues: (r) => r.requested_reviewers,
|
||||
filterMode: "multiselect",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue