mirror of
https://github.com/lukaszraczylo/ghtracker.git
synced 2026-10-12 00:45:38 +00:00
Each open issue now has its own alert. An issue with recent activity is issue_fresh. An issue idle for issue_stale_after or longer is issue_stale. This replaces the single issues_stale line per repo. A non-draft pull request younger than pr_warn_after now raises pr_fresh. Older pull requests keep pr_waiting. All new alerts have warn severity, so a repo with open work is no longer green. The pr_open alert for auto actions is unchanged.
30 lines
830 B
TypeScript
30 lines
830 B
TypeScript
import {
|
|
faClockRotateLeft,
|
|
faCodePullRequest,
|
|
faCircleDot,
|
|
faGears,
|
|
faPlugCircleXmark,
|
|
faTriangleExclamation,
|
|
type IconDefinition,
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
/** Maps a server alert kind to the icon and group used in the UI. */
|
|
export const KIND_ICON: Record<string, IconDefinition> = {
|
|
workflow_failed: faGears,
|
|
workflow_stuck: faGears,
|
|
pr_waiting: faCodePullRequest,
|
|
pr_checks_failing: faCodePullRequest,
|
|
pr_fresh: faCodePullRequest,
|
|
issue_stale: faCircleDot,
|
|
issue_fresh: faCircleDot,
|
|
refresh_failed: faPlugCircleXmark,
|
|
data_stale: faClockRotateLeft,
|
|
partial_data: faTriangleExclamation,
|
|
}
|
|
|
|
export function iconFor(kind: string): IconDefinition {
|
|
return KIND_ICON[kind] ?? faTriangleExclamation
|
|
}
|
|
|
|
export const DATA_KINDS = ['refresh_failed', 'data_stale', 'partial_data']
|