Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
24c324c5
Commit
24c324c5
authored
7 years ago
by
Steven Hargrove
Committed by
Rhys Arkins
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
refactor: initPlatform
parent
7b0ae535
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/platform/index.js
+14
-11
14 additions, 11 deletions
lib/platform/index.js
with
14 additions
and
11 deletions
lib/platform/index.js
+
14
−
11
View file @
24c324c5
const
github
=
require
(
'
./github
'
);
/* eslint-disable global-require */
const
gitlab
=
require
(
'
./gitlab
'
);
const
platforms
=
new
Map
([
const
vsts
=
require
(
'
./vsts
'
);
[
'
github
'
,
require
(
'
./github
'
)],
[
'
gitlab
'
,
require
(
'
./gitlab
'
)],
[
'
vsts
'
,
require
(
'
./vsts
'
)],
]);
/* eslint-enable global-require */
function
initPlatform
(
val
)
{
function
getPlatformApi
(
platform
)
{
if
(
val
===
'
github
'
)
{
return
platforms
.
get
(
platform
);
global
.
platform
=
github
;
}
}
else
if
(
val
===
'
gitlab
'
)
{
global
.
platform
=
gitlab
;
function
initPlatform
(
platform
)
{
}
else
if
(
val
===
'
vsts
'
)
{
global
.
platform
=
getPlatformApi
(
platform
);
global
.
platform
=
vsts
;
}
}
}
module
.
exports
=
{
module
.
exports
=
{
initPlatform
,
initPlatform
,
getPlatformApi
,
};
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment