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(
`Fetching changelog: ${sourceUrl} (${currentVersion} -> ${newVersion})`
);
let res: ChangeLogResult | null = null;
const platform = detectPlatform(sourceUrl);
if (platform === 'github') {
return await sourceGithub.getChangeLogJSON(config);
}
switch (platform) {
case 'gitlab':
res = await sourceGitlab.getChangeLogJSON(config);
break;
case 'github':
res = await sourceGithub.getChangeLogJSON(config);
break;
if (platform === 'gitlab') {
return await sourceGitlab.getChangeLogJSON(config);
default:
logger.info(
{ sourceUrl, hostType: platform },
'Unknown platform, skipping changelog fetching.'
);
break;
}
logger.info(
{ sourceUrl, hostType: platform },
'Unknown platform, skipping changelog fetching.'
);
return res;
} catch (err) /* istanbul ignore next */ {
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.
Finish editing this message first!
Please register or to comment