Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove .git should only happen at the end of url #13

Open
thgh opened this issue Jul 15, 2015 · 2 comments
Open

remove .git should only happen at the end of url #13

thgh opened this issue Jul 15, 2015 · 2 comments

Comments

@thgh
Copy link

thgh commented Jul 15, 2015

Github api sends repo urls like this: https://api.github.com/repos/

Webhook-deployer sees this as https://apihub.com/repos/

@tingc10
Copy link

tingc10 commented Aug 27, 2015

I found that in the incoming.js file under line 39, it checks against repoData.repository.url.

If you change it to repoData.repository['html_url'], everything else should work as expected

@cloudier
Copy link

I ran into similar problems. To work around them, I went into node_modules/webhook-deployer\lib\incoming.js and changed lines 40-58. It seems that the payload I received didn't have anything under 'ref'.

// remove .git from the repo string, since the hook will not have that address when it comes from github
// so instead of explaining that you shouldnt enter ".git", we just remove it here.
if (repoData.repository.url == deploy.repo) {
     runDeploy(deploy);
}
else {
     webdep.log("No, wrong repo, nothing to do");
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants