()
| 3 | import { GitlabPlatformKit } from "./gitlab"; |
| 4 | |
| 5 | export const getPlatformKit = () => { |
| 6 | if (process.env.BITBUCKET_PIPELINE_UUID) { |
| 7 | return new BitbucketPlatformKit(); |
| 8 | } |
| 9 | |
| 10 | if (process.env.GITHUB_ACTION) { |
| 11 | return new GitHubPlatformKit(); |
| 12 | } |
| 13 | |
| 14 | if (process.env.GITLAB_CI) { |
| 15 | return new GitlabPlatformKit(); |
| 16 | } |
| 17 | |
| 18 | throw new Error("This platform is not supported"); |
| 19 | }; |