| 36 | } |
| 37 | |
| 38 | export 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 |
nothing calls this directly
no outgoing calls
no test coverage detected