feat(alerts): raise one alert per open issue and pull request

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.
This commit is contained in:
2026-10-06 14:14:26 +01:00
parent eff9559aee
commit 5bca4c38f0
8 changed files with 67 additions and 57 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ describe('AttentionRow', () => {
it('omits the age for an unknown timestamp', () => {
const w = mount(AttentionRow, {
props: {
row: row({ since: '0001-01-01T00:00:00Z', kind: 'issues_stale' }),
row: row({ since: '0001-01-01T00:00:00Z', kind: 'issue_stale' }),
nowMs,
critSeconds: CRIT_SECONDS,
},
+2 -2
View File
@@ -38,7 +38,7 @@ const fleet = () =>
}),
alert({
repo: 'b/two',
kind: 'issues_stale',
kind: 'issue_stale',
severity: 'warn',
subject: '4 stale issues',
url: '3',
@@ -62,7 +62,7 @@ describe('kindGroup', () => {
['workflow_stuck', 'workflow'],
['pr_waiting', 'pr'],
['pr_checks_failing', 'pr'],
['issues_stale', 'issue'],
['issue_stale', 'issue'],
['refresh_failed', 'data'],
['data_stale', 'data'],
['partial_data', 'data'],
+1 -1
View File
@@ -24,7 +24,7 @@ export const emptyFilters = (): Filters => ({
export function kindGroup(kind: string): KindGroup {
if (kind.startsWith('workflow_')) return 'workflow'
if (kind.startsWith('pr_')) return 'pr'
if (kind === 'issues_stale') return 'issue'
if (kind.startsWith('issue_')) return 'issue'
return 'data'
}
+3 -1
View File
@@ -14,7 +14,9 @@ export const KIND_ICON: Record<string, IconDefinition> = {
workflow_stuck: faGears,
pr_waiting: faCodePullRequest,
pr_checks_failing: faCodePullRequest,
issues_stale: faCircleDot,
pr_fresh: faCodePullRequest,
issue_stale: faCircleDot,
issue_fresh: faCircleDot,
refresh_failed: faPlugCircleXmark,
data_stale: faClockRotateLeft,
partial_data: faTriangleExclamation,