mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(gitFs): allow admin renovateFork override
This commit is contained in:
parent
5b43931aab
commit
10d0f58c88
1 changed files with 4 additions and 3 deletions
|
@ -114,6 +114,7 @@ async function initRepo({
|
|||
gitPrivateKey,
|
||||
gitFs,
|
||||
localDir,
|
||||
renovateFork,
|
||||
}) {
|
||||
logger.debug(`initRepo("${repository}")`);
|
||||
logger.info(
|
||||
|
@ -151,16 +152,16 @@ async function initRepo({
|
|||
res = await get(`repos/${repository}`);
|
||||
logger.trace({ repositoryDetails: res.body }, 'Repository details');
|
||||
// istanbul ignore if
|
||||
if (res.body.fork && gitFs) {
|
||||
if (res.body.fork && gitFs && !renovateFork) {
|
||||
try {
|
||||
const { renovateFork } = JSON.parse(
|
||||
const renovateConfig = JSON.parse(
|
||||
Buffer.from(
|
||||
(await get(`repos/${config.repository}/contents/renovate.json`))
|
||||
.body.content,
|
||||
'base64'
|
||||
).toString()
|
||||
);
|
||||
if (!renovateFork) {
|
||||
if (!renovateConfig.renovateFork) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in a new issue