Skip to content

Commit

Permalink
Bump @probot/octokit-plugin-config from 1.1.4 to 1.1.5 (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen committed Feb 6, 2022
1 parent f551477 commit 7ac817b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
23 changes: 12 additions & 11 deletions dist/index.js
Expand Up @@ -8010,7 +8010,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau

var yaml = _interopDefault(__nccwpck_require__(21917));

const VERSION = "1.1.4";
const VERSION = "1.1.5";

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

if (!requestedRepoFile.config) {
if (repo === ".github") {
return [requestedRepoFile];
return files;
}

const defaultRepoConfig = await getConfigFile(octokit, {
owner,
repo: ".github",
path
});
return [requestedRepoFile, defaultRepoConfig];
} // if the configuration has no `_extends` key, we are done here.
files.push(defaultRepoConfig);
}

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

if (!requestedRepoFile.config._extends) {
return [requestedRepoFile];
if (!file.config || !file.config._extends) {
return files;
} // parse the value of `_extends` into request parameters to
// retrieve the new configuration file


let extendConfigOptions = extendsToGetContentParams({
owner,
path,
url: requestedRepoFile.url,
extendsValue: requestedRepoFile.config._extends
url: file.url,
extendsValue: file.config._extends
}); // remove the `_extends` key from the configuration that is returned

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

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Expand Up @@ -762,9 +762,9 @@
is-base64 "^1.1.0"

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

0 comments on commit 7ac817b

Please sign in to comment.