Hello ,
I am trying to create GitHub a webhook via the API Call.
However the generateTargetUrl
() itself is failing .The API Call itself is not triggering .The following is the code piece in the Server.js
onInstallHandler: function (args) {
generateTargetUrl().done(function (targetUrl)
{
let URL='https://api.github.com/repos/'+client.iparams.get("username")+'/'+client.iparams.get("reponame")+'/hooks';
$request.post(aURL, {
headers: {
Authorization: 'token '+client.iparams.get("client_key"),
},
isOAuth: true,
json: {
name: 'web',
active: true,
events: [
'issues'
],
config: {
url: targetUrl,
content_type: 'json'
}
}
})
Any help would be appreciated
Thanks a bunch,
Soumyajyoti