-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give the CSSWG a custom triage heuristic.
Since they don't have any auto-labeling system or issue templates, if an issue has a label, then someone with the ability to triage it has touched it, so we can consider it triaged.
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { IssueOrPr } from "./github.js"; | ||
|
||
const triagePredicates: Record<`${string}/${string}`, (issue: Pick<IssueOrPr, 'labels'>) => boolean> = { | ||
'w3c/csswg-drafts': function (issue: Pick<IssueOrPr, 'labels'>) { | ||
return issue.labels.nodes.length > 0; | ||
}, | ||
}; | ||
|
||
// True if this repository has configured a custom function to say whether an issue is triaged | ||
// without an SLO, instead of the common `Priority: Eventually` label. | ||
export function hasTriagePredicate(repoNameWithOwner: string) { | ||
return repoNameWithOwner in triagePredicates; | ||
} | ||
|
||
// True if this issue should be considered triaged without an SLO. | ||
export function isTriaged(repoNameWithOwner: string, issue: Pick<IssueOrPr, 'labels'>): boolean { | ||
return triagePredicates[repoNameWithOwner]?.(issue); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters