mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
8a841a7c81
Closes #2482
22 lines
515 B
JavaScript
22 lines
515 B
JavaScript
/* eslint-disable global-require */
|
|
const platforms = new Map([
|
|
['bitbucket', require('./bitbucket')],
|
|
['bitbucket-server', require('./bitbucket-server')],
|
|
['github', require('./github')],
|
|
['gitlab', require('./gitlab')],
|
|
['azure', require('./azure')],
|
|
]);
|
|
/* eslint-enable global-require */
|
|
|
|
function getPlatformApi(platform) {
|
|
return platforms.get(platform);
|
|
}
|
|
|
|
function initPlatform(platform) {
|
|
global.platform = getPlatformApi(platform);
|
|
}
|
|
|
|
module.exports = {
|
|
initPlatform,
|
|
getPlatformApi,
|
|
};
|