UNPKG

763 BJavaScriptView Raw
1/*
2* @adonisjs/mrm-preset
3*
4* (c) Harminder Virk <virk@adonisjs.com>
5*
6* For the full copyright and license information, please view the LICENSE
7* file that was distributed with this source code.
8*/
9
10const stale = require('./stale')
11const lock = require('./lock')
12const mergeConfig = require('../utils/mergeConfig')
13
14/**
15 * Configuring probot apps
16 *
17 * @method task
18 *
19 * @param {Object} config
20 *
21 * @return {void}
22 */
23function task (config) {
24 mergeConfig(config, {
25 probotApps: []
26 })
27
28 if (config.probotApps.includes('stale')) {
29 stale.up()
30 } else {
31 stale.down()
32 }
33
34 if (config.probotApps.includes('lock')) {
35 lock.up()
36 } else {
37 lock.down()
38 }
39}
40
41task.description = 'Configures certain probot applications'
42module.exports = task