MCPcopy
hub / github.com/danger/danger-js / Platform

Interface Platform

source/platforms/platform.ts:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38export interface Platform extends PlatformCommunicator {
39 /** Mainly for logging and error reporting */
40 readonly name: string
41
42 getReviewInfo: () => Promise<any>
43 /** Pulls in the platform specific metadata for code review runs in JSON format */
44 getPlatformReviewDSLRepresentation: () => Promise<any>
45 /** Pulls in the platform specific metadata for event runs */
46 getPlatformReviewSimpleRepresentation?: () => Promise<any>
47 /** Pulls in the Code Review Diff, and offers a succinct user-API for it */
48 getPlatformGitRepresentation: () => Promise<GitJSONDSL>
49 /** Get the contents of a file at a path */
50 getFileContents: (path: string, slug?: string, ref?: string) => Promise<string>
51 /** Optional: Wrap the danger evaluation with some of your code */
52 executeRuntimeEnvironment?: (
53 start: DangerRunner["runDangerfileEnvironment"],
54 dangerfilePath: string,
55 environment: any
56 ) => Promise<void>
57}
58
59// This is basically the commenting aspect of a platform, which allow us to
60// separate out the comment handling vs the DSL generation for a platform

Callers

nothing calls this directly

Implementers 5

BitBucketServersource/platforms/BitBucketServer.ts
GitLabsource/platforms/GitLab.ts
BitBucketCloudsource/platforms/BitBucketCloud.ts
FakePlatformsource/platforms/FakePlatform.ts
LocalGitsource/platforms/LocalGit.ts

Calls

no outgoing calls

Tested by

no test coverage detected