renovate/lib/platform/index.js

23 lines
515 B
JavaScript
Raw Normal View History

2018-04-04 11:29:38 +00:00
/* eslint-disable global-require */
const platforms = new Map([
['bitbucket', require('./bitbucket')],
['bitbucket-server', require('./bitbucket-server')],
2018-04-04 11:29:38 +00:00
['github', require('./github')],
['gitlab', require('./gitlab')],
['azure', require('./azure')],
2018-04-04 11:29:38 +00:00
]);
/* eslint-enable global-require */
2018-04-04 11:29:38 +00:00
function getPlatformApi(platform) {
return platforms.get(platform);
}
function initPlatform(platform) {
global.platform = getPlatformApi(platform);
2017-11-07 12:31:34 +00:00
}
2017-11-07 12:31:34 +00:00
module.exports = {
initPlatform,
2018-04-04 11:29:38 +00:00
getPlatformApi,
2017-11-07 12:31:34 +00:00
};