mirror of
https://github.com/lukaszraczylo/ghtracker.git
synced 2026-10-15 01:07:40 +00:00
feat: add GitHub repository dashboard with Prometheus metrics
ghtracker authenticates as a GitHub App and scans a configured list of repositories on a schedule. It serves a dashboard, a JSON state endpoint, a health probe and Prometheus metrics. The dashboard lists only items that need attention: failing workflows, pull requests that wait too long or fail their checks, stale issues and projects that failed to scan. It has search, dynamic filters and a button that rescans on demand. The Vue app is embedded in the Go binary. The client protects the GitHub rate limit with conditional requests, a request reserve and Retry-After handling.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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,
|
||||
issues_stale: 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']
|
||||
Reference in New Issue
Block a user