You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/10/10 03:25:42 UTC

[incubator-openwhisk-catalog] branch master updated: using existing __OW_API_HOST for host name (#244)

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-catalog.git


The following commit(s) were added to refs/heads/master by this push:
     new 5414efc  using existing __OW_API_HOST for host name (#244)
5414efc is described below

commit 5414efc49752fbe7c09308e2b9934e596df19a99
Author: Narine C <na...@gmail.com>
AuthorDate: Mon Oct 9 22:25:41 2017 -0500

    using existing __OW_API_HOST for host name (#244)
    
    * using existing OW_API_HOST for host name
    
    * Update webhook.js
---
 packages/github/webhook.js | 5 +++--
 packages/installGit.sh     | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/packages/github/webhook.js b/packages/github/webhook.js
index dc427a2..01b02ec 100644
--- a/packages/github/webhook.js
+++ b/packages/github/webhook.js
@@ -33,8 +33,9 @@ function main(params) {
   var lifecycleEvent = params.lifecycleEvent;
   var triggerName = params.triggerName.split("/");
 
-    // URL of the whisk system. The calls of github will go here.
-  var whiskCallbackUrl = 'https://' + process.env.__OW_API_KEY + "@" + params.endpoint + '/api/v1/namespaces/' + encodeURIComponent(triggerName[1]) + '/triggers/' + encodeURIComponent(triggerName[2]);
+  // URL of the whisk system. The calls of github will go here.
+  var urlHost = require('url').parse(process.env.__OW_API_HOST);
+  var whiskCallbackUrl = urlHost.protocol + '//' + process.env.__OW_API_KEY + "@" + urlHost.host + '/api/v1/namespaces/' + encodeURIComponent(triggerName[1]) + '/triggers/' + encodeURIComponent(triggerName[2]);
 
     // The URL to create the webhook on Github
   var registrationEndpoint = 'https://api.github.com/repos/' + (organization ? organization : username) + '/' + repository + '/hooks';
diff --git a/packages/installGit.sh b/packages/installGit.sh
index b90dc1d..0eb25b4 100755
--- a/packages/installGit.sh
+++ b/packages/installGit.sh
@@ -12,7 +12,6 @@ source "$PACKAGE_HOME/util.sh"
 echo Installing Git package.
 
 createPackage github \
-    -p endpoint "openwhisk.ng.bluemix.net" \
     -a description "Package which contains actions and feeds to interact with Github"
 
 waitForAll

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].