-
Notifications
You must be signed in to change notification settings - Fork 58
/
peril-settings-json.schema
110 lines (109 loc) · 4.95 KB
/
peril-settings-json.schema
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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"GitHubInstallationSettings": {
"properties": {
"disable_github_check": {
"description": "Disables using GitHub checks in the messages posted by Danger.",
"type": "boolean"
},
"env_vars": {
"description": "An array of allowed ENV vars which are passed into Dangerfiles.",
"items": {
"type": "string"
},
"type": "array"
},
"ignored_repos": {
"description": "An array of repos that should not run any Peril dangerfiles. This is so that you can\nturn on Peril for an entire org, and just make the occasional edge case.",
"items": {
"type": "string"
},
"type": "array"
},
"modules": {
"description": "An array of modules for Peril to install, requires a re-deploy of the server to update.\nThey will be `yarn install`'d on the deploy, and available for Dangerfiles.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"RunnerRuleset": {
"additionalProperties": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "string"
}
]
},
"type": "object"
},
"TaskObject": {
"properties": {
"daily": {
"type": "string"
},
"friday-morning-est": {
"type": "string"
},
"hourly": {
"type": "string"
},
"monday-morning-est": {
"type": "string"
},
"thursday-morning-est": {
"type": "string"
},
"tuesday-morning-est": {
"type": "string"
},
"wednesday-morning-est": {
"type": "string"
},
"weekly": {
"type": "string"
}
},
"type": "object"
},
"UniqueRepoRuleset": {
"additionalProperties": {
"$ref": "#/definitions/RunnerRuleset"
},
"type": "object"
}
},
"properties": {
"repos": {
"$ref": "#/definitions/UniqueRepoRuleset",
"description": "A set of repos and their additional event hooks, these are\nin addition to the ones provided by `\"rules\"` which are applied\nto every repo.\n\n \"repos\" : {\n \"orta/ORStackView\": {\n \"issue.created\": \"orta/peril@lock_issues.ts\"\n }\n }"
},
"rules": {
"$ref": "#/definitions/RunnerRuleset",
"description": "Having rules in here would mean that it would happen on _any_ event, another JSON type in the DB"
},
"scheduler": {
"$ref": "#/definitions/TaskObject",
"description": "Scheduled tasks to run using a human readable syntax. This runs from a set of standard hooks\nwhich will trigger running a task. The current hooks (may be out of date, see `InstallationSchedulerKeys` in\nthe codebase) are \"hourly\", \"daily\", \"weekly\", \"monday-morning-est\", \"tuesday-morning-est\",\n\"wednesday-morning-est\", \"thursday-morning-est\", \"friday-morning-est\"\n\n \"scheduler\" : {\n \"daily\": \"daily-license-check\",\n \"weekly\": \"cleanup-stale-issues\"\n }"
},
"settings": {
"$ref": "#/definitions/GitHubInstallationSettings",
"description": "In our DB this is represented as a JSON type, so you should anticipate have settings\nas a nullable type. These are the entire installation settings."
},
"tasks": {
"$ref": "#/definitions/RunnerRuleset",
"description": "Individual tasks which a Peril can schedule, either via the Dangerfile API or via the\nscheduler object. These keys are used by the scheduler in the settings JSON, and can be used\nto trigger a job to occur in the future via `peril.scheduleTask` in a Dangerfile.\n\n \"tasks\" : {\n \"message-slack-dev-channel\": \"tasks/slackDevChannel.ts\",\n \"daily-license-check\": \"tasks/dailyLicenseCheck.ts\",\n \"standup\": [\"tasks/checkForOpenRFCs.ts\", \"tasks/checkForNewRepos.ts\"],\n }"
}
},
"type": "object"
}