Skip to content

Commit 08f943c

Browse files
andrey-helldargithub-actions[bot]
authored andcommitted
🏗️ Build the application version 2.3.0
1 parent 5003462 commit 08f943c

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

dist/index.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34575,22 +34575,26 @@ const url = __importStar(__nccwpck_require__(3136));
3457534575
const defaults_1 = __nccwpck_require__(5620);
3457634576
const readConfig = async (config, userConfigPath, repo) => {
3457734577
const content = (0, filesystem_1.readFile)(config, userConfigPath);
34578-
const remoteConfig = await (0, exports.readRemoteConfig)(repo, userConfigPath);
34578+
const remoteConfig = await (0, exports.readRemoteConfig)(config, repo, userConfigPath);
3457934579
if (content === "") {
3458034580
return (0, merge_1.merge)(defaults_1.defaultConfig, remoteConfig, config);
3458134581
}
3458234582
const userConfig = yaml.load(content);
3458334583
return (0, merge_1.merge)(defaults_1.defaultConfig, remoteConfig, userConfig, config);
3458434584
};
3458534585
exports.readConfig = readConfig;
34586-
const readRemoteConfig = async (repo, filename) => {
34586+
const readRemoteConfig = async (config, repo, filename) => {
3458734587
try {
3458834588
if (repo === undefined) {
3458934589
return {};
3459034590
}
34591-
const response = await repo.getRawFile(filename);
34592-
if (response !== "") {
34593-
return yaml.load(response);
34591+
const response1 = await repo.getRawFile(".github", filename);
34592+
if (response1 !== "") {
34593+
return yaml.load(response1);
34594+
}
34595+
const response2 = await repo.getRawFile(config.repository?.owner || ".github", filename);
34596+
if (response2 !== "") {
34597+
return yaml.load(response2);
3459434598
}
3459534599
return {};
3459634600
}
@@ -35103,11 +35107,11 @@ class Repository {
3510335107
throw error;
3510435108
}
3510535109
}
35106-
async getRawFile(filename) {
35110+
async getRawFile(repo, filename) {
3510735111
try {
3510835112
const response = await this._octokit.rest.repos.getContent({
3510935113
owner: this._config.repository?.owner,
35110-
repo: ".github",
35114+
repo: repo,
3511135115
path: filename,
3511235116
headers: {
3511335117
Accept: "application/vnd.github.v3.raw",

0 commit comments

Comments
 (0)