-
-
Notifications
You must be signed in to change notification settings - Fork 365
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 #89 from kwonoj/feat-surf
feat(surf): add surf ci provider
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
### master | ||
|
||
// Add your own contribution below | ||
* Adds surf-build ci provider - kwonoj | ||
|
||
### 0.8.0 | ||
|
||
|
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,32 @@ | ||
import { Env, CISource } from "../ci_source" | ||
import { ensureEnvKeysExist, ensureEnvKeysAreInt } from "../ci_source_helpers" | ||
|
||
export class Surf implements CISource { | ||
constructor(private readonly env: Env) { | ||
} | ||
|
||
get name(): string { | ||
return "surf-build" | ||
} | ||
|
||
get isCI(): boolean { | ||
return ensureEnvKeysExist(this.env, ["SURF_REPO", "SURF_NWO"]) | ||
} | ||
|
||
get isPR(): boolean { | ||
return this.isCI | ||
} | ||
|
||
get pullRequestID(): string { | ||
const key = "SURF_PR_NUM" | ||
return ensureEnvKeysAreInt(this.env, [key]) ? this.env[key] : "" | ||
} | ||
|
||
get repoSlug(): string { | ||
return this.env["SURF_NWO"] | ||
} | ||
|
||
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