mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(gitFs): post-commit fetch
This commit is contained in:
parent
b701e15870
commit
c59233819b
1 changed files with 3 additions and 12 deletions
|
@ -403,18 +403,9 @@ class Storage {
|
|||
'--force': true,
|
||||
'-u': true,
|
||||
});
|
||||
try {
|
||||
await this._git!.raw([
|
||||
'remote',
|
||||
'set-branches',
|
||||
'--add',
|
||||
'origin',
|
||||
branchName,
|
||||
]);
|
||||
await this._git!.fetch(['origin', branchName, '--depth=2']);
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
logger.info({ err }, 'Error fetching branch after create');
|
||||
}
|
||||
// Fetch it after create
|
||||
const ref = `refs/heads/${branchName}:refs/remotes/origin/${branchName}`;
|
||||
await this._git!.fetch(['origin', ref, '--depth=2', '--force']);
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
logger.debug({ err }, 'Error commiting files');
|
||||
if (err.message.includes('.github/main.workflow')) {
|
||||
|
|
Loading…
Reference in a new issue