thunderbird-patch-review
Simple email patch review tool for Thunderbird
git clone git://mccd.space/thunderbird-patch-review| Log | Files | Refs | README | LICENSE | Mail | Artifacts |
sourcehut.js (687B)
1 // Sourcehut (lists.sr.ht) email controls: replies to a patchset thread may
2 // carry an X-Sourcehut-Patchset-Update header to change the patchset status.
3
4 export const STATUS_HEADER = "X-Sourcehut-Patchset-Update";
5
6 export const SOURCEHUT_STATUSES = [
7 "APPROVED",
8 "NEEDS_REVISION",
9 "REJECTED",
10 "PROPOSED",
11 "SUPERSEDED",
12 "APPLIED",
13 ];
14
15 /**
16 * True when any of the given header values (List-Id, recipients, cc) points
17 * at a sourcehut mailing list. Matches both the address form
18 * "~user/list@lists.sr.ht" and the List-Id form "<~user/list.lists.sr.ht>".
19 */
20 export function isSourcehutList(values) {
21 return (values || []).some((v) => v && /\blists\.sr\.ht\b/i.test(v));
22 }