mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
feat(presets): add schedule presets for automerge (#20305)
Co-authored-by: Rhys Arkins <rhys@arkins.net> Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
This commit is contained in:
parent
f885dc033a
commit
d791614edb
1 changed files with 58 additions and 12 deletions
|
@ -2,39 +2,85 @@ import type { Preset } from '../types';
|
|||
|
||||
/* eslint sort-keys: ["error", "asc", {caseSensitive: false, natural: true}] */
|
||||
|
||||
const daily = ['before 2am'];
|
||||
const earlyMondays = ['before 3am on Monday'];
|
||||
const monthly = ['before 3am on the first day of the month'];
|
||||
const nonOfficeHours = [
|
||||
'after 10pm every weekday',
|
||||
'before 5am every weekday',
|
||||
'every weekend',
|
||||
];
|
||||
const quarterly = ['every 3 months on the first day of the month'];
|
||||
const weekdays = ['every weekday'];
|
||||
const weekends = ['every weekend'];
|
||||
const yearly = ['every 12 months on the first day of the month'];
|
||||
|
||||
export const presets: Record<string, Preset> = {
|
||||
automergeDaily: {
|
||||
automergeSchedule: daily,
|
||||
description: 'Schedule automerge daily.',
|
||||
},
|
||||
automergeEarlyMondays: {
|
||||
automergeSchedule: earlyMondays,
|
||||
description: 'Weekly automerge schedule on early Monday mornings.',
|
||||
},
|
||||
automergeMonthly: {
|
||||
automergeSchedule: monthly,
|
||||
description: 'Schedule automerge monthly.',
|
||||
},
|
||||
automergeNonOfficeHours: {
|
||||
automergeSchedule: nonOfficeHours,
|
||||
description:
|
||||
'Schedule automerge for typical non-office hours (night time and weekends).',
|
||||
},
|
||||
automergeQuarterly: {
|
||||
automergeSchedule: quarterly,
|
||||
description: 'Schedule automerge quarterly.',
|
||||
},
|
||||
automergeWeekdays: {
|
||||
automergeSchedule: weekdays,
|
||||
description: 'Schedule automerge for weekdays.',
|
||||
},
|
||||
automergeWeekends: {
|
||||
automergeSchedule: weekends,
|
||||
description: 'Schedule automerge for weekends.',
|
||||
},
|
||||
automergeWeekly: {
|
||||
description: 'Schedule automerge weekly.',
|
||||
extends: ['schedule:automergeEarlyMondays'],
|
||||
},
|
||||
automergeYearly: {
|
||||
automergeSchedule: yearly,
|
||||
description: 'Schedule automerge once a year (not recommended).',
|
||||
},
|
||||
daily: {
|
||||
description: 'Schedule daily.',
|
||||
schedule: ['before 2am'],
|
||||
schedule: daily,
|
||||
},
|
||||
earlyMondays: {
|
||||
description: 'Weekly schedule on early Monday mornings.',
|
||||
schedule: ['before 3am on Monday'],
|
||||
schedule: earlyMondays,
|
||||
},
|
||||
monthly: {
|
||||
description: 'Schedule monthly.',
|
||||
schedule: ['before 3am on the first day of the month'],
|
||||
schedule: monthly,
|
||||
},
|
||||
nonOfficeHours: {
|
||||
description:
|
||||
'Schedule for typical non-office hours (night time and weekends).',
|
||||
schedule: [
|
||||
'after 10pm every weekday',
|
||||
'before 5am every weekday',
|
||||
'every weekend',
|
||||
],
|
||||
schedule: nonOfficeHours,
|
||||
},
|
||||
quarterly: {
|
||||
description: 'Schedule quarterly.',
|
||||
schedule: ['every 3 months on the first day of the month'],
|
||||
schedule: quarterly,
|
||||
},
|
||||
weekdays: {
|
||||
description: 'Schedule for weekdays.',
|
||||
schedule: ['every weekday'],
|
||||
schedule: weekdays,
|
||||
},
|
||||
weekends: {
|
||||
description: 'Schedule for weekends.',
|
||||
schedule: ['every weekend'],
|
||||
schedule: weekends,
|
||||
},
|
||||
weekly: {
|
||||
description: 'Schedule weekly.',
|
||||
|
@ -42,6 +88,6 @@ export const presets: Record<string, Preset> = {
|
|||
},
|
||||
yearly: {
|
||||
description: 'Schedule once a year (not recommended).',
|
||||
schedule: ['every 12 months on the first day of the month'],
|
||||
schedule: yearly,
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue