Skip to content

Commit 916b470

Browse files
committed
refactor: update cli-config.schema
1 parent 4d4eb5d commit 916b470

2 files changed

Lines changed: 39 additions & 27 deletions

File tree

resources/cli.config.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,29 @@ meta:
88
dependabot:
99
npm:
1010
enabled: true
11-
interval: cron
12-
cronjob: 0 0 * * 1
13-
timezone: UTC
14-
open-pull-requests-limit: 5
11+
config:
12+
schedule:
13+
interval: cron
14+
cronjob: 0 0 * * 1
15+
timezone: UTC
16+
open-pull-requests-limit: 5
1517
docker:
1618
enabled: true
17-
interval: cron
18-
cronjob: 0 0 * * *
19-
timezone: UTC
20-
open-pull-requests-limit: 5
19+
config:
20+
schedule:
21+
interval: cron
22+
cronjob: 0 0 * * *
23+
timezone: UTC
24+
open-pull-requests-limit: 5
2125
github-actions:
2226
enabled: true
2327
actionsEnabled: false
24-
interval: cron
25-
cronjob: 0 0 * * *
26-
timezone: UTC
27-
open-pull-requests-limit: 5
28+
config:
29+
schedule:
30+
interval: cron
31+
cronjob: 0 0 * * *
32+
timezone: UTC
33+
open-pull-requests-limit: 5
2834

2935
executables:
3036
- "**/*.sh"

resources/schemas/cli.config.schema.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,31 @@
225225
type: object
226226
properties:
227227
enabled: { type: boolean }
228-
interval: { enum: [cron, daily, weekly, monthly, quarterly, semiannually, yearly] }
229-
cronjob: { type: string, format: cron }
230-
day: { type: string, format: weekday }
231-
time: { type: string, format: time }
232-
timezone: { type: string, format: timezone }
233-
open-pull-requests-limit: { type: integer, minimum: 0 }
234-
228+
config: { $ref: dependabot-config }
235229
additionalProperties: false
230+
required: [enabled, config]
236231

237232
- $id: dependabot-github-actions
238233
type: object
239234
properties:
240235
enabled: { type: boolean }
241-
actionsEnabled: { type: boolean } # XXX for github-actions only
242-
interval: { enum: [cron, daily, weekly, monthly, quarterly, semiannually, yearly] }
243-
cronjob: { type: string, format: cron }
244-
day: { type: string, format: weekday }
245-
time: { type: string, format: time }
246-
timezone: { type: string, format: timezone }
247-
open-pull-requests-limit: { type: integer, minimum: 0 }
248-
236+
actionsEnabled: { type: boolean }
237+
config: { $ref: dependabot-config }
249238
additionalProperties: false
239+
required: [enabled, actionsEnabled, config]
240+
241+
- $id: dependabot-config
242+
type: object
243+
properties:
244+
schedule:
245+
type: object
246+
properties:
247+
interval: { enum: [cron, daily, weekly, monthly, quarterly, semiannually, yearly] }
248+
cronjob: { type: string, format: cron }
249+
day: { type: string, format: weekday }
250+
time: { type: string, format: time }
251+
timezone: { type: string, format: timezone }
252+
additionalProperties: false
253+
required: [interval]
254+
open-pull-requests-limit: { type: integer, minimum: 0 }
255+
required: [schedule]

0 commit comments

Comments
 (0)