Skip to content
Snippets Groups Projects
Commit 7b6d2d9c authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(pr): wider try/catch on changelog versioning

parent e79319d3
Branches
Tags
No related merge requests found
...@@ -11,21 +11,21 @@ export async function getChangeLogJSON( ...@@ -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) { try {
return null; if (!sourceUrl) {
} return null;
const version = allVersioning.get(versioning); }
if (!fromVersion || version.equals(fromVersion, toVersion)) { const version = allVersioning.get(versioning);
return null; if (!fromVersion || version.equals(fromVersion, toVersion)) {
} return null;
}
const releases = args.releases || (await getInRangeReleases(args)); const releases = args.releases || (await getInRangeReleases(args));
try {
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;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment