diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/convertLcovToCoveralls.js | 3 | ||||
| -rw-r--r-- | lib/getOptions.js | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/convertLcovToCoveralls.js b/lib/convertLcovToCoveralls.js index 3f604e1..8b89f26 100644 --- a/lib/convertLcovToCoveralls.js +++ b/lib/convertLcovToCoveralls.js @@ -51,6 +51,9 @@ var convertLcovToCoveralls = function(input, options, cb){ if (options.repo_token) { postJson.repo_token = options.repo_token; } + if (options.service_pull_request) { + postJson.service_pull_request = options.service_pull_request; + } parsed.forEach(function(file){ postJson.source_files.push(convertLcovFileObject(file, filepath)); }); 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; |
