code-suggester
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -127,3 +127,4 @@ "use strict"; | ||
.trimRight() // remove the trailing new line | ||
.split('\n'); | ||
.split('\n') | ||
.filter(line => !!line.trim()); | ||
child_process_1.execSync('git reset .', { cwd: gitRootDir }); | ||
@@ -130,0 +131,0 @@ return diffs; |
@@ -99,2 +99,20 @@ "use strict"; | ||
const origin = options.fork === false ? upstream : await fork_1.fork(octokit, upstream); | ||
if (options.fork) { | ||
// try to sync the fork | ||
await retry(async () => await octokit.repos.mergeUpstream({ | ||
owner: origin.owner, | ||
repo: origin.repo, | ||
branch: gitHubConfigs.primary, | ||
}), { | ||
retries: options.retry, | ||
factor: 2.8411, | ||
minTimeout: 3000, | ||
randomize: false, | ||
onRetry: (e, attempt) => { | ||
e.message = `Error creating syncing upstream: ${e.message}`; | ||
logger_1.logger.error(e); | ||
logger_1.logger.info(`Retry attempt #${attempt}...`); | ||
}, | ||
}); | ||
} | ||
const originBranch = { | ||
@@ -101,0 +119,0 @@ ...origin, |
# Changelog | ||
### [2.1.4](https://github.com/googleapis/code-suggester/compare/v2.1.3...v2.1.4) (2022-02-23) | ||
### Bug Fixes | ||
* **cli:** don't crash when there are no changes ([#334](https://github.com/googleapis/code-suggester/issues/334)) ([e606126](https://github.com/googleapis/code-suggester/commit/e606126e818198bf54881a6fde264e04845ef420)), closes [#229](https://github.com/googleapis/code-suggester/issues/229) | ||
* try to merge the upstream repo branch on the fork ([#330](https://github.com/googleapis/code-suggester/issues/330)) ([2d5c3f9](https://github.com/googleapis/code-suggester/commit/2d5c3f9dd55804fa7e9aa0b776e238cb71776029)), closes [#335](https://github.com/googleapis/code-suggester/issues/335) | ||
### [2.1.3](https://github.com/googleapis/code-suggester/compare/v2.1.2...v2.1.3) (2022-02-22) | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "code-suggester", | ||
"description": "Library to propose code changes", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google LLC", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
177858
2224