[Pkg-javascript-commits] [node-coveralls] 202/332: add support for CircleCI pull request commenting
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Nov 9 13:54:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-coveralls.
commit 45ef2a5508ed4485a0ee15354dcb1e3829fa9a6e
Author: Josh Callender <jcallender at change.org>
Date: Fri Apr 24 12:00:41 2015 -0700
add support for CircleCI pull request commenting
---
lib/convertLcovToCoveralls.js | 3 +++
lib/getOptions.js | 1 +
test/getOptions.js | 2 ++
3 files changed, 6 insertions(+)
diff --git a/lib/convertLcovToCoveralls.js b/lib/convertLcovToCoveralls.js
index 3f604e1..394ab9e 100644
--- a/lib/convertLcovToCoveralls.js
+++ b/lib/convertLcovToCoveralls.js
@@ -48,6 +48,9 @@ var convertLcovToCoveralls = function(input, options, cb){
if (options.service_job_id){
postJson.service_job_id = options.service_job_id;
}
+ if (options.service_pull_request) {
+ postJson.service_pull_request = options.service_pull_request;
+ }
if (options.repo_token) {
postJson.repo_token = options.repo_token;
}
diff --git a/lib/getOptions.js b/lib/getOptions.js
index eab67f4..4289ad9 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -35,6 +35,7 @@ var getBaseOptions = function(cb){
if (process.env.CIRCLECI){
options.service_name = 'circleci';
options.service_job_id = process.env.CIRCLE_BUILD_NUM;
+ options.service_pull_request = process.env.CI_PULL_REQUEST;
git_commit = process.env.CIRCLE_SHA1;
git_branch = process.env.CIRCLE_BRANCH;
}
diff --git a/test/getOptions.js b/test/getOptions.js
index 8a77708..12505a1 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -282,9 +282,11 @@ var testCircleCi = function(sut, done){
process.env.CIRCLE_BRANCH = "master";
process.env.CIRCLE_BUILD_NUM = "1234";
process.env.CIRCLE_SHA1 = "e3e3e3e3e3e3e3e3e";
+ process.env.CI_PULL_REQUEST = 'http://github.com/node-coveralls/pull/3';
sut(function(err, options){
options.service_name.should.equal("circleci");
options.service_job_id.should.equal("1234");
+ options.service_pull_request.should.equal('http://github.com/node-coveralls/pull/3');
options.git.should.eql({ head:
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git
More information about the Pkg-javascript-commits
mailing list