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

fix(git): throw config error if branch is blocking (#9341)

parent 7903d517
No related branches found
Tags 24.98.3
No related merge requests found
...@@ -703,6 +703,13 @@ export async function commitFiles({ ...@@ -703,6 +703,13 @@ export async function commitFiles({
return commit; return commit;
} catch (err) /* istanbul ignore next */ { } catch (err) /* istanbul ignore next */ {
checkForPlatformFailure(err); checkForPlatformFailure(err);
if (err.message.includes(`'refs/heads/renovate' exists`)) {
const error = new Error(CONFIG_VALIDATION);
error.configFile = 'None';
error.validationError = 'An existing branch is blocking Renovate';
error.validationMessage = `Renovate needs to create the branch "${branchName}" but is blocked from doing so because of an existing branch called "renovate". Please remove it so that Renovate can proceed.`;
throw error;
}
if ( if (
err.message.includes( err.message.includes(
'refusing to allow a GitHub App to create or update workflow' 'refusing to allow a GitHub App to create or update workflow'
......
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