Skip to content
Snippets Groups Projects
Unverified Commit 1f79f22e authored by Sergei Zharinov's avatar Sergei Zharinov Committed by GitHub
Browse files

fix(util/git): Skip PR update on "force-with-lease" errors (#14228)

parent 00cab7c3
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ export function checkForPlatformFailure(err: Error): void { ...@@ -22,6 +22,7 @@ export function checkForPlatformFailure(err: Error): void {
'early EOF', 'early EOF',
'fatal: bad config', // .gitmodules problem 'fatal: bad config', // .gitmodules problem
'expected flush after ref listing', 'expected flush after ref listing',
'[rejected] (stale info)',
]; ];
for (const errorStr of externalHostFailureStrings) { for (const errorStr of externalHostFailureStrings) {
if (err.message.includes(errorStr)) { if (err.message.includes(errorStr)) {
...@@ -120,12 +121,6 @@ export function handleCommitError( ...@@ -120,12 +121,6 @@ export function handleCommitError(
logger.error({ err }, 'Error committing files.'); logger.error({ err }, 'Error committing files.');
return null; return null;
} }
if (err.message.includes('[rejected] (stale info)')) {
logger.info(
'Branch update was rejected because local copy is not up-to-date.'
);
return null;
}
if ( if (
err.message.includes('denying non-fast-forward') || err.message.includes('denying non-fast-forward') ||
err.message.includes('GH003: Sorry, force-pushing') err.message.includes('GH003: Sorry, force-pushing')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment