1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | const stale = require('./stale')
|
11 | const lock = require('./lock')
|
12 | const mergeConfig = require('../utils/mergeConfig')
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | function 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 |
|
41 | task.description = 'Configures certain probot applications'
|
42 | module.exports = task
|