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

fix(git): git pull immediately after automerge (#10390)

Call git.pull() before performing a fetch, to handle the case where the default branch has been updated.

Closes #10372
parent 0e0f08b5
No related branches found
No related tags found
No related merge requests found
...@@ -266,6 +266,7 @@ export async function syncGit(): Promise<void> { ...@@ -266,6 +266,7 @@ export async function syncGit(): Promise<void> {
try { try {
await git.raw(['remote', 'set-url', 'origin', config.url]); await git.raw(['remote', 'set-url', 'origin', config.url]);
await resetToBranch(await getDefaultBranch(git)); await resetToBranch(await getDefaultBranch(git));
await git.pull();
// istanbul ignore if // istanbul ignore if
if (process.env.NODE_ENV !== 'test') { if (process.env.NODE_ENV !== 'test') {
await git.raw(['config', '--unset-all', 'remote.origin.fetch']); await git.raw(['config', '--unset-all', 'remote.origin.fetch']);
......
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