aboutsummaryrefslogtreecommitdiff
path: root/lib/getOptions.js
diff options
context:
space:
mode:
authorEthan Langevin <[email protected]>2015-07-14 17:29:33 -0400
committerEthan Langevin <[email protected]>2015-07-14 17:32:03 -0400
commit4344c189726451016e86627a0c11620ce420cdaf (patch)
tree637cf9d9c852cb245519e1048ad331bc33ed2109 /lib/getOptions.js
parent64653c6df1d63065b0fb0b4984ac4c88f809b068 (diff)
downloadnode-coveralls-4344c189726451016e86627a0c11620ce420cdaf.tar.xz
node-coveralls-4344c189726451016e86627a0c11620ce420cdaf.zip
Pass CI_PULL_REQUEST through to coveralls if it is set
Diffstat (limited to 'lib/getOptions.js')
-rw-r--r--lib/getOptions.js6
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;