Skip to content

Commit 7ac817b

Browse files
authored
Bump @probot/octokit-plugin-config from 1.1.4 to 1.1.5 (#1057)
1 parent f551477 commit 7ac817b

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

dist/index.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8010,7 +8010,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
80108010

80118011
var yaml = _interopDefault(__nccwpck_require__(21917));
80128012

8013-
const VERSION = "1.1.4";
8013+
const VERSION = "1.1.5";
80148014

80158015
function _defineProperty(obj, key, value) {
80168016
if (key in obj) {
@@ -8215,38 +8215,39 @@ async function getConfigFiles(octokit, {
82158215
repo,
82168216
path,
82178217
ref: branch
8218-
}); // if no configuration file present in selected repository,
8218+
});
8219+
const files = [requestedRepoFile]; // if no configuration file present in selected repository,
82198220
// try to load it from the `.github` repository
82208221

82218222
if (!requestedRepoFile.config) {
82228223
if (repo === ".github") {
8223-
return [requestedRepoFile];
8224+
return files;
82248225
}
82258226

82268227
const defaultRepoConfig = await getConfigFile(octokit, {
82278228
owner,
82288229
repo: ".github",
82298230
path
82308231
});
8231-
return [requestedRepoFile, defaultRepoConfig];
8232-
} // if the configuration has no `_extends` key, we are done here.
8232+
files.push(defaultRepoConfig);
8233+
}
82338234

8235+
const file = files[files.length - 1]; // if the configuration has no `_extends` key, we are done here.
82348236

8235-
if (!requestedRepoFile.config._extends) {
8236-
return [requestedRepoFile];
8237+
if (!file.config || !file.config._extends) {
8238+
return files;
82378239
} // parse the value of `_extends` into request parameters to
82388240
// retrieve the new configuration file
82398241

82408242

82418243
let extendConfigOptions = extendsToGetContentParams({
82428244
owner,
82438245
path,
8244-
url: requestedRepoFile.url,
8245-
extendsValue: requestedRepoFile.config._extends
8246+
url: file.url,
8247+
extendsValue: file.config._extends
82468248
}); // remove the `_extends` key from the configuration that is returned
82478249

8248-
delete requestedRepoFile.config._extends;
8249-
const files = [requestedRepoFile]; // now load the configuration linked from the `_extends` key. If that
8250+
delete file.config._extends; // now load the configuration linked from the `_extends` key. If that
82508251
// configuration also includes an `_extends` key, then load that configuration
82518252
// as well, until the target configuration has no `_extends` key
82528253

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,9 @@
762762
is-base64 "^1.1.0"
763763

764764
"@probot/octokit-plugin-config@^1.0.0":
765-
version "1.1.4"
766-
resolved "https://registry.yarnpkg.com/@probot/octokit-plugin-config/-/octokit-plugin-config-1.1.4.tgz#31516fbc77732c781d64b084c0a0e98fc6ee3ce3"
767-
integrity sha512-/wPms7XaP7vohb7iLw0FKGCju5wXdaeEU2jfb0ysLv2u5u5Ex5cJhRooS/1pMkPhkQPNRwo1NFrodT/vha/ZQw==
765+
version "1.1.5"
766+
resolved "https://registry.yarnpkg.com/@probot/octokit-plugin-config/-/octokit-plugin-config-1.1.5.tgz#169f6da21261c39443681f16c4b37c294d46a437"
767+
integrity sha512-dPrccDkb5QVZYZ3Gq3aDEdfsuqid687iu+z3jBKFI1LwgQuRaUsmihR0ZLHdXKX6HK6rUw/5Jxg5ZUo0OWWUSA==
768768
dependencies:
769769
"@types/js-yaml" "^4.0.5"
770770
js-yaml "^4.1.0"

0 commit comments

Comments
 (0)