Skip to content
Snippets Groups Projects
Unverified Commit 69705c99 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

feat(automerge): recurse after automerge (#10229)

parent 13863d7c
No related branches found
No related merge requests found
...@@ -25,7 +25,8 @@ try { ...@@ -25,7 +25,8 @@ try {
// istanbul ignore next // istanbul ignore next
export async function renovateRepository( export async function renovateRepository(
repoConfig: RenovateConfig repoConfig: RenovateConfig,
canRetry = true
): Promise<ProcessResult> { ): Promise<ProcessResult> {
splitInit(); splitInit();
let config = setAdminConfig(repoConfig); let config = setAdminConfig(repoConfig);
...@@ -47,7 +48,14 @@ export async function renovateRepository( ...@@ -47,7 +48,14 @@ export async function renovateRepository(
const res = await updateRepo(config, branches); const res = await updateRepo(config, branches);
addSplit('update'); addSplit('update');
await setBranchCache(branches); await setBranchCache(branches);
if (res !== 'automerged') { if (res === 'automerged') {
if (canRetry) {
logger.info('Renovating repository again after automerge result');
const recursiveRes = await renovateRepository(repoConfig, false);
return recursiveRes;
}
logger.debug(`Automerged but already retried once`);
} else {
await ensureMasterIssue(config, branches); await ensureMasterIssue(config, branches);
} }
await finaliseRepo(config, branchList); await finaliseRepo(config, branchList);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment