-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathtriage-config.mjs
More file actions
67 lines (56 loc) · 3.36 KB
/
Copy pathtriage-config.mjs
File metadata and controls
67 lines (56 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Central configuration for the contribution-triage workflows.
//
// Consumed by:
// * .github/scripts/triage.mjs (event-triggered rule check)
// * .github/scripts/close-unaddressed.mjs (scheduled auto-close)
//
// Edit here to change the deadline, label metadata, or the close-message
// texts. Rule detection lives in triage.mjs; the warning-comment framing
// lives there too.
// ── Timing ───────────────────────────────────────────────────────────────
export const gracePeriodDays = 7;
// ── Labels ───────────────────────────────────────────────────────────────
// Keys are JS names (camelCase). Values are the actual GitHub label names
// (kebab-case). Labels are auto-created on demand.
export const labels = {
needsUpdates: 'state-needs-updates',
rulesNotFollowed: 'state-rules-not-followed',
aiAuthored: 'ai-authored',
bypassAutoClose: 'do-not-auto-close'
};
// Colors and descriptions used when a managed label needs to be created.
// `bypassAutoClose` is intentionally omitted — the maintainer creates it
// manually when they want to exempt a specific submission.
export const labelDefs = {
[labels.needsUpdates]: {
color: 'fbca04',
description: 'Author needs to update the description to match the contribution rules.'
},
[labels.rulesNotFollowed]: {
color: 'f9d0c4',
description: 'Closed because the contribution rules were not followed.'
},
[labels.aiAuthored]: {
color: 'c5def5',
description: 'Contribution was drafted with help of an AI agent.'
}
};
// ── Detection ────────────────────────────────────────────────────────────
// AI-authored disclosure marker (see AGENTS.md). Rule detection patterns
// live next to their rules in triage.mjs.
export const aiDisclosureToken = 'alphatab-ai-authored-v1';
// NOTE: the list of `author_association` values that skip triage entirely
// (OWNER / COLLABORATOR / MEMBER) is hardcoded in contribution-rules.yml so
// maintainer submissions don't even start a job.
// ── Close messages ───────────────────────────────────────────────────────
// Posted when the grace period expires without an update. The warning
// comment posted at triage time is composed in triage.mjs so it can list
// the specific violations.
const closeIssue = `Closing automatically — the description wasn't updated within the ${gracePeriodDays}-day grace period, so \`${labels.rulesNotFollowed}\` is applied and this issue is closed.
The earlier bot comment lists what needs fixing. Reopen any time by updating the description.`;
const closePr = `Closing automatically — the description wasn't updated within the ${gracePeriodDays}-day grace period, so \`${labels.rulesNotFollowed}\` is applied and this pull request is closed.
The earlier bot comment lists what needs fixing. Reopen any time by updating the description.`;
export const messages = {
closeIssue,
closePr
};