generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.json
103 lines (103 loc) · 4.92 KB
/
schema.json
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "configuration",
"description": "YAML configuration accepted by sizeup-action",
"type": "object",
"properties": {
"labeling": {
"description": "Configuration that controls how we apply score category labels to each assessed pull request",
"type": "object",
"properties": {
"applyCategoryLabels": {
"description": "Whether or not to apply the category label to each assessed pull request",
"type": "boolean",
"default": true
},
"excludeDraftPullRequests": {
"description": "Whether or not to skip applying the category label to a draft pull request",
"type": "boolean",
"default": false
},
"categoryLabelPrefix": {
"description": "The prefix to add to each category label that we apply",
"type": "string",
"default": "sizeup/"
}
}
},
"commenting": {
"description": "Configuration that controls how we add comments to assessed pull requests",
"type": "object",
"properties": {
"addCommentWhenScoreThresholdHasBeenExceeded": {
"description": "Whether or not to add a comment to each assessed pull request that exceeds the configured score threshold",
"type": "boolean",
"default": true
},
"excludeDraftPullRequests": {
"description": "Whether or not to skip commenting on a draft pull request that exceeds the configured score threshold",
"type": "boolean",
"default": true
},
"scoreThreshold": {
"description": "The score above which this tool will post a comment on the pull request.",
"type": "number",
"default": 100
},
"commentTemplate": {
"description": "The template for the comment that should be added to each pull request that exceeds the configured score threshold",
"type": "string",
"default": "👋 {{author}} this pull request exceeds the recommended reviewability score threshold of {{threshold}}. Your actual score was {{score}}.\n\n[Research](https://www.cabird.com/static/93aba3256c80506d3948983db34d3ba3/rigby2013convergent.pdf) has shown that this makes it harder for reviewers to provide quality feedback.\n\nWe recommend that you reduce the size of this PR by separating commits into stacked PRs."
}
}
},
"optIns": {
"description": "A list of GitHub handles for users or teams that have opted into this workflow",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"shadowOptOuts": {
"description": "Whether or not to compute a score even for users who have opted out of the workflow",
"type": "boolean",
"default": false
},
"artifacts": {
"description": "Configuration options for persisting the output of this workflow.",
"type": "object",
"properties": {
"score": {
"description": "Configuration for the workflow artifact that contains details about the score",
"type": "object",
"properties": {
"format": {
"description": "The file format to use for the score artifact",
"type": "string",
"enum": ["csv", "json"]
},
"retention": {
"description": "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.",
"type": "number"
},
"excludeDraftPullRequests": {
"description": "Whether or not to skip creating the artifact for workflow runs on a draft pull request",
"type": "boolean",
"default": true
}
},
"required": [
"format"
]
}
},
"required": [
"score"
]
},
"sizeup": {
"$ref": "https://raw.githubusercontent.com/lerebear/sizeup/main/src/config/schema.json"
}
}
}