-
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from kwonoj/feat-external-ci
Allow to specify external CI source provider
- Loading branch information
Showing
21 changed files
with
145 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
type Env = any; | ||
declare var CISource: Danger.CISource | ||
|
||
declare namespace Danger { | ||
export interface CISourceConstructor { | ||
new (env?: Env): CISource; | ||
} | ||
|
||
export interface CISource implements CISourceConstructor { | ||
/** The project name, mainly for showing errors */ | ||
readonly name: string, | ||
|
||
/** The hash of environment variables */ | ||
readonly env: Env, | ||
|
||
/** Does this validate as being on a particular CI? */ | ||
readonly isCI: boolean, | ||
|
||
/** Does this validate as being on a particular PR on a CI? */ | ||
readonly isPR: boolean, | ||
|
||
/** What is the reference slug for this environment? */ | ||
readonly repoSlug: string, | ||
|
||
/** What platforms can this CI communicate with? */ | ||
readonly supportedPlatforms: Array<string>, | ||
|
||
/** What unique id can be found for the code review platform's PR */ | ||
readonly pullRequestID: string, | ||
} | ||
} | ||
|
||
declare module "danger" { | ||
export = Danger; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// @flow | ||
"use strict" | ||
|
||
export default class DummyCI { | ||
get name(): string { return "Dummy Testing CI" } | ||
|
||
get isCI(): boolean { return false } | ||
get isPR(): boolean { return true } | ||
|
||
get pullRequestID(): string { return this.env.pr } | ||
get repoSlug(): string { return this.env.repo } | ||
get supportedPlatforms(): string[] { return ["github"] } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/ci_source/Circle.js → source/ci_source/providers/Circle.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/ci_source/Fake.js → source/ci_source/providers/Fake.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/ci_source/Jenkins.js → source/ci_source/providers/Jenkins.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/ci_source/Semaphore.js → source/ci_source/providers/Semaphore.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/ci_source/Travis.js → source/ci_source/providers/Travis.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @flow | ||
|
||
import Travis from "./Travis" | ||
import Circle from "./Circle" | ||
import Semaphore from "./Semaphore" | ||
import Jenkins from "./Jenkins" | ||
import Fake from "./Fake" | ||
|
||
const providers: Array<any> = [Travis, Circle, Semaphore, Jenkins, Fake] | ||
export default providers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters