diff options
| author | Nick Merwin <[email protected]> | 2015-07-16 18:22:13 -0700 |
|---|---|---|
| committer | Nick Merwin <[email protected]> | 2015-07-16 18:22:13 -0700 |
| commit | cdff9ff2ad276a33ad8710042d942a8e30e043bb (patch) | |
| tree | 637cf9d9c852cb245519e1048ad331bc33ed2109 /lib/getOptions.js | |
| parent | 64653c6df1d63065b0fb0b4984ac4c88f809b068 (diff) | |
| parent | 4344c189726451016e86627a0c11620ce420cdaf (diff) | |
| download | node-coveralls-cdff9ff2ad276a33ad8710042d942a8e30e043bb.tar.xz node-coveralls-cdff9ff2ad276a33ad8710042d942a8e30e043bb.zip | |
Merge pull request #101 from ejlangev/support-pull-requests
Pass CI_PULL_REQUEST through to coveralls if it is set
Diffstat (limited to 'lib/getOptions.js')
| -rw-r--r-- | lib/getOptions.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/getOptions.js b/lib/getOptions.js index eab67f4..42a3de1 100644 --- a/lib/getOptions.js +++ b/lib/getOptions.js @@ -9,6 +9,12 @@ var getBaseOptions = function(cb){ var git_commit = process.env.COVERALLS_GIT_COMMIT; var git_branch = process.env.COVERALLS_GIT_BRANCH; + var match = (process.env.CI_PULL_REQUEST || "").match(/(\d+)$/); + + if (match) { + options.service_pull_request = match[1]; + } + if (process.env.TRAVIS){ options.service_name = 'travis-ci'; options.service_job_id = process.env.TRAVIS_JOB_ID; |
