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 #37 from kevmoo/i34_coveralls_service_name_travis
Populate service_name and service_job_id for Travis
- Loading branch information
Showing
7 changed files
with
72 additions
and
41 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
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,18 @@ | ||
library coveralls_dart.src.services.travis; | ||
|
||
/// Returns the current branch name for the provided [environment] as defined | ||
/// by Travis. | ||
/// | ||
/// If none exists, return `null`. | ||
String getBranch(Map<String, String> environment) => | ||
environment["TRAVIS_BRANCH"]; | ||
|
||
/// Following the coveralls conventions | ||
/// See https://coveralls.zendesk.com/hc/en-us/articles/201774865-API-Introduction | ||
String getServiceName(Map<String, String> environment) => | ||
(environment['TRAVIS'] == 'true') ? 'travis-ci' : null; | ||
|
||
/// Following the coveralls conventions | ||
/// See https://coveralls.zendesk.com/hc/en-us/articles/201774865-API-Introduction | ||
String getServiceJobId(Map<String, String> environment) => | ||
environment['TRAVIS_JOB_ID']; |
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