Skip to content

Commit

Permalink
fix(gitea): Fix "getJsonFile" implementation (#7393)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Oct 1, 2020
1 parent fcdb226 commit 2a890dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/platform/gitea/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ const platform: Platform = {
async getJsonFile(fileName: string): Promise<any | null> {
try {
const contents = await helper.getRepoContents(
config.repository,
fileName,
defaultConfigFile,
config.defaultBranch
);
return JSON.parse(contents.contentString);
Expand Down Expand Up @@ -286,7 +286,7 @@ const platform: Platform = {

// Optionally check if Renovate is disabled by attempting to fetch default configuration file
if (optimizeForDisabled) {
renovateConfig = await platform.getJsonFile(config.repository);
renovateConfig = await platform.getJsonFile(defaultConfigFile);
if (renovateConfig && renovateConfig.enabled === false) {
throw new Error(REPOSITORY_DISABLED);
}
Expand Down

0 comments on commit 2a890dc

Please sign in to comment.