generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configuration.ts
142 lines (141 loc) · 4.19 KB
/
configuration.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* YAML configuration accepted by sizeup-action
*/
export interface Configuration {
/**
* Configuration that controls how we apply score category labels to each assessed pull request
*/
labeling?: {
/**
* Whether or not to apply the category label to each assessed pull request
*/
applyCategoryLabels?: boolean;
/**
* Whether or not to skip applying the category label to a draft pull request
*/
excludeDraftPullRequests?: boolean;
/**
* The prefix to add to each category label that we apply
*/
categoryLabelPrefix?: string;
};
/**
* Configuration that controls how we add comments to assessed pull requests
*/
commenting?: {
/**
* Whether or not to add a comment to each assessed pull request that exceeds the configured score threshold
*/
addCommentWhenScoreThresholdHasBeenExceeded?: boolean;
/**
* Whether or not to skip commenting on a draft pull request that exceeds the configured score threshold
*/
excludeDraftPullRequests?: boolean;
/**
* The score above which this tool will post a comment on the pull request.
*/
scoreThreshold?: number;
/**
* The template for the comment that should be added to each pull request that exceeds the configured score threshold
*/
commentTemplate?: string;
};
/**
* A list of GitHub handles for users or teams that have opted into this workflow
*
* @minItems 1
*/
optIns?: [string, ...string[]];
/**
* Whether or not to compute a score even for users who have opted out of the workflow
*/
shadowOptOuts?: boolean;
/**
* Configuration options for persisting the output of this workflow.
*/
artifacts?: {
/**
* Configuration for the workflow artifact that contains details about the score
*/
score: {
/**
* The file format to use for the score artifact
*/
format: "csv" | "json";
/**
* Retention period (in days) for the score artifact. The actual retention period used may be shorter than this in the presence of an overriding repository- or organization- level retention period setting.
*/
retention?: number;
/**
* Whether or not to skip creating the artifact for workflow runs on a draft pull request
*/
excludeDraftPullRequests?: boolean;
};
};
sizeup?: Configuration1;
}
/**
* YAML configuration accepted by sizeup
*/
export interface Configuration1 {
/**
* category that will be assigned to a pull request depending on its score
*/
categories?: {
/**
* human-friendly name of the category
*/
name: string;
/**
* A visual label that should be used to represent this category
*/
label?: {
/**
* name of the label that should be used to represent this category
*/
name: string;
/**
* describes the meaning of the label that will be used to represent this category
*/
description?: string;
/**
* preferred CSS hex color label that should be used to represent this category
*/
color?: string;
};
/**
* inclusive upper bound on the score that a pull request must have to be assigned this category
*/
lte?: number;
}[];
scoring?: {
/**
* an expression, written in prefix-notation, that describes how to combine features to produce a score
*/
formula: string;
/**
* named expression aliases, each of which can be used as shortand in a formula
*/
aliases?: {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[\w][\w-]*$".
*/
[k: string]: string;
};
};
/**
* glob expressions matching file patterns that should be considered as tests during the scoring process
*/
testFilePatterns?: string[];
/**
* glob expressions matching file patterns that are ignored in the scoring process
*/
ignoredFilePatterns?: string[];
}