mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(pr): wider try/catch on changelog versioning
This commit is contained in:
parent
e79319d300
commit
7b6d2d9c99
1 changed files with 11 additions and 11 deletions
|
@ -11,21 +11,21 @@ export async function getChangeLogJSON(
|
||||||
args: BranchUpgradeConfig
|
args: BranchUpgradeConfig
|
||||||
): Promise<ChangeLogResult | null> {
|
): Promise<ChangeLogResult | null> {
|
||||||
const { sourceUrl, versioning, fromVersion, toVersion } = args;
|
const { sourceUrl, versioning, fromVersion, toVersion } = args;
|
||||||
if (!sourceUrl) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const version = allVersioning.get(versioning);
|
|
||||||
if (!fromVersion || version.equals(fromVersion, toVersion)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const releases = args.releases || (await getInRangeReleases(args));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (!sourceUrl) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const version = allVersioning.get(versioning);
|
||||||
|
if (!fromVersion || version.equals(fromVersion, toVersion)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const releases = args.releases || (await getInRangeReleases(args));
|
||||||
|
|
||||||
const res = await sourceGithub.getChangeLogJSON({ ...args, releases });
|
const res = await sourceGithub.getChangeLogJSON({ ...args, releases });
|
||||||
return res;
|
return res;
|
||||||
} catch (err) /* istanbul ignore next */ {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
logger.error({ err }, 'getChangeLogJSON error');
|
logger.error({ args, err }, 'getChangeLogJSON error');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue