Skip to content

Commit

Permalink
fix(git): git pull immediately after automerge (#10390)
Browse files Browse the repository at this point in the history
Call git.pull() before performing a fetch, to handle the case where the default branch has been updated.

Closes #10372
  • Loading branch information
rarkins committed Jun 10, 2021
1 parent 0e0f08b commit e1c7845
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/util/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export async function syncGit(): Promise<void> {
try {
await git.raw(['remote', 'set-url', 'origin', config.url]);
await resetToBranch(await getDefaultBranch(git));
await git.pull();
// istanbul ignore if
if (process.env.NODE_ENV !== 'test') {
await git.raw(['config', '--unset-all', 'remote.origin.fetch']);
Expand Down

0 comments on commit e1c7845

Please sign in to comment.