Skip to content

Commit 9da62c6

Browse files
author
dessant
committed
feat: extend settings from a different repository
1 parent 4abb957 commit 9da62c6

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ lockComment: >
5454

5555
# pulls:
5656
# daysUntilLock: 30
57+
58+
# Repository to extend settings from
59+
# _extends: repo
5760
```
5861

5962
## How are issues and pull requests determined to be inactive?

assets/app-description.md

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ lockComment: >
4141

4242
# pulls:
4343
# daysUntilLock: 30
44+
45+
# Repository to extend settings from
46+
# _extends: repo
4447
```
4548

4649
## Supporting the Project

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"dependencies": {
2525
"joi": "^13.3.0",
2626
"probot": "^6.2.0",
27+
"probot-config": "^0.1.0",
2728
"probot-scheduler": "^1.1.0",
2829
"uuid": "^3.2.1"
2930
},

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const uuidV4 = require('uuid/v4');
22
const createScheduler = require('probot-scheduler');
3+
const getMergedConfig = require('probot-config');
34

45
const App = require('./lock');
56
const schema = require('./schema');
@@ -27,7 +28,7 @@ module.exports = robot => {
2728
const configFile = 'lock.yml';
2829
const repo = context.repo();
2930
try {
30-
const repoConfig = await context.config(configFile);
31+
const repoConfig = await getMergedConfig(context, configFile);
3132
if (!repoConfig) {
3233
logger.warn({repo, configFile}, 'Missing config');
3334
repoConfig = {perform: false};

yarn.lock

+13
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,13 @@ joi@^13.3.0:
20062006
isemail "3.x.x"
20072007
topo "3.x.x"
20082008

2009+
js-yaml@^3.10.0:
2010+
version "3.12.0"
2011+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
2012+
dependencies:
2013+
argparse "^1.0.7"
2014+
esprima "^4.0.0"
2015+
20092016
js-yaml@^3.6.1:
20102017
version "3.11.0"
20112018
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
@@ -3061,6 +3068,12 @@ prepend-http@^1.0.1:
30613068
version "1.0.4"
30623069
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
30633070

3071+
probot-config@^0.1.0:
3072+
version "0.1.0"
3073+
resolved "https://registry.yarnpkg.com/probot-config/-/probot-config-0.1.0.tgz#b6ef11ccc468e7f28e06deb68b34e093b7c7e88e"
3074+
dependencies:
3075+
js-yaml "^3.10.0"
3076+
30643077
probot-scheduler@^1.1.0:
30653078
version "1.1.0"
30663079
resolved "https://registry.yarnpkg.com/probot-scheduler/-/probot-scheduler-1.1.0.tgz#eda193fd7faaf9a193a8b362903d78741dcda9b7"

0 commit comments

Comments
 (0)