Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Feb 15, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/util/git/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function handleCommitError(
logger.info(
'Branch update was rejected because local copy is not up-to-date.'
);
return null;
throw new ExternalHostError(err, 'git');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'[rejected] (stale info)' can be added to externalHostFailureStrings instead, but log message would be too verbose IMO.

Anyway, please suggest better alternative if the solution is okay in general.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it look in the logs with your current suggestion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it look in the logs with your current suggestion?

Please, take a look here: #14228 (comment)

}
if (
err.message.includes('denying non-fast-forward') ||
Expand Down