Skip to content
Snippets Groups Projects
Unverified Commit 492d3137 authored by Sergei Zharinov's avatar Sergei Zharinov Committed by GitHub
Browse files

fix(changelog): Revert platform dispatch changes (#23048)

parent fd3d577a
No related branches found
No related tags found
No related merge requests found
...@@ -26,23 +26,29 @@ export async function getChangeLogJSON( ...@@ -26,23 +26,29 @@ export async function getChangeLogJSON(
`Fetching changelog: ${sourceUrl} (${currentVersion} -> ${newVersion})` `Fetching changelog: ${sourceUrl} (${currentVersion} -> ${newVersion})`
); );
let res: ChangeLogResult | null = null;
const platform = detectPlatform(sourceUrl); const platform = detectPlatform(sourceUrl);
if (platform === 'github') { switch (platform) {
return await sourceGithub.getChangeLogJSON(config); case 'gitlab':
} res = await sourceGitlab.getChangeLogJSON(config);
break;
case 'github':
res = await sourceGithub.getChangeLogJSON(config);
break;
if (platform === 'gitlab') { default:
return await sourceGitlab.getChangeLogJSON(config); logger.info(
{ sourceUrl, hostType: platform },
'Unknown platform, skipping changelog fetching.'
);
break;
} }
logger.info( return res;
{ sourceUrl, hostType: platform },
'Unknown platform, skipping changelog fetching.'
);
} catch (err) /* istanbul ignore next */ { } catch (err) /* istanbul ignore next */ {
logger.error({ config, err }, 'getChangeLogJSON error'); logger.error({ config, 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