@@ -8010,7 +8010,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
80108010
80118011var yaml = _interopDefault(__nccwpck_require__(21917));
80128012
8013- const VERSION = "1.1.4 ";
8013+ const VERSION = "1.1.5 ";
80148014
80158015function _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
0 commit comments