-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathtemplate.ts
68 lines (63 loc) · 1.47 KB
/
template.ts
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
68
interface Template {
titles: string[];
}
// An enum for different templates and issue/PR can match
export enum TemplateType {
GeneralIssue,
BugReportIssue,
PullRequest,
None,
}
// Titles of general issue template
const generalIssueTemplateTitles = [
'### What is this about?',
'### Scenario',
'### Design',
'### Technical Details',
'### Threat Modeling Framework',
'### Acceptance Criteria',
'### References',
];
// Titles of bug report template
const bugReportIssueTemplateTitles = [
'### Describe the bug',
'### Expected behavior',
'### Screenshots', // TODO: replace '### Screenshots' by '### Screenshots/Recordings' in January 2024 (as most issues will meet this criteria by then)
'### Steps to reproduce',
'### Error messages or log output',
'### Version',
'### Build type',
'### Device',
'### Operating system',
'### Additional context',
'### Severity',
];
// Titles of PR template
const prTemplateTitles = [
'## **Description**',
'## **Related issues**',
'## **Manual testing steps**',
'## **Screenshots/Recordings**',
'## **Pre-merge author checklist**',
'## **Pre-merge reviewer checklist**',
];
export const templates = new Map<TemplateType, Template>([
[
TemplateType.GeneralIssue,
{
titles: generalIssueTemplateTitles,
},
],
[
TemplateType.BugReportIssue,
{
titles: bugReportIssueTemplateTitles,
},
],
[
TemplateType.PullRequest,
{
titles: prTemplateTitles,
},
],
]);