[Pkg-javascript-commits] [node-coveralls] 258/332: Feature: Support codeship docker environment variables

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:54:08 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 2fb137eefba11b1ca5139e4f6269451229586cf3
Author: Marc Riegel <mail at mrcrgl.de>
Date:   Sun Jun 26 08:02:09 2016 +0200

    Feature: Support codeship docker environment variables
---
 lib/getOptions.js  | 9 ++++++++-
 test/getOptions.js | 9 ++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/getOptions.js b/lib/getOptions.js
index e579eee..2536067 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -9,6 +9,7 @@ var getBaseOptions = function(cb){
   var options = {};
   var git_commit = process.env.COVERALLS_GIT_COMMIT;
   var git_branch = process.env.COVERALLS_GIT_BRANCH;
+  var git_committer_name, git_committer_email, git_message;
 
   var match = (process.env.CI_PULL_REQUEST || "").match(/(\d+)$/);
 
@@ -57,6 +58,9 @@ var getBaseOptions = function(cb){
     options.service_job_id = process.env.CI_BUILD_NUMBER;
     git_commit = process.env.CI_COMMIT_ID;
     git_branch = process.env.CI_BRANCH;
+    git_committer_name = process.env.CI_COMMITTER_NAME;
+    git_committer_email = process.env.CI_COMMITTER_EMAIL;
+    git_message = process.env.CI_COMMIT_MESSAGE;
   }
 
   if (process.env.WERCKER){
@@ -123,7 +127,10 @@ var getBaseOptions = function(cb){
   if (git_commit){
     fetchGitData({
       head: {
-        id: git_commit
+        id: git_commit,
+        committer_name: git_committer_name,
+        committer_email: git_committer_email,
+        message: git_message
       },
       branch: git_branch
     }, function(err, git){
diff --git a/test/getOptions.js b/test/getOptions.js
index 3394a85..b82f365 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -338,6 +338,9 @@ var testCodeship = function(sut, done) {
   process.env.CI_BUILD_NUMBER = '1234';
   process.env.CI_COMMIT_ID = "e3e3e3e3e3e3e3e3e";
   process.env.CI_BRANCH = "master";
+  process.env.CI_COMMITTER_NAME = "John Doe";
+  process.env.CI_COMMITTER_EMAIL = "jd at example.com";
+  process.env.CI_COMMIT_MESSAGE = "adadadadadadadadadad";
   sut(function(err, options){
     options.service_name.should.equal("codeship");
     options.service_job_id.should.equal("1234");
@@ -345,9 +348,9 @@ var testCodeship = function(sut, done) {
                                { id: 'e3e3e3e3e3e3e3e3e',
                                  author_name: 'Unknown Author',
                                  author_email: '',
-                                 committer_name: 'Unknown Committer',
-                                 committer_email: '',
-                                 message: 'Unknown Commit Message' },
+                                 committer_name: 'John Doe',
+                                 committer_email: 'jd at example.com',
+                                 message: 'adadadadadadadadadad' },
                               branch: 'master',
                               remotes: [] });
     done();

-- 
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