zpnk / stage-ci

Automatic deploy previews for your PRs using zeit.co/now.
https://stage.now.sh
MIT License
131 stars 23 forks source link

Add GitLab support #25

Closed hugomd closed 7 years ago

hugomd commented 7 years ago

Closes #9.

I'm using a rather long XOR statement in src/core.js to check that either GITHUB_TOKEN or GITLAB_TOKEN are set, the same with GITHUB_WEBHOOK_SECRET and GITLAB_WEBHOOK_SECRET — not sure if there's a nicer way to do this? I realised that it makes more sense to allow one or both, which makes it easy to clean up the if statement 👍

Any all and all feedback welcome ✌️

hugomd commented 7 years ago

I can confirm that this works for both GitLab and GitHub without issue 🎉

zpnk commented 7 years ago

Hey @hugomd this is awesome, thanks so much for this feature! 🙌

I like that you added nodemon for the dev server. 👍

Everything looks really good. I want to test this out a little before merging, but from looking at it I don't think there's much I'd change.

hugomd commented 7 years ago

@zpnk I've made all of the aforementioned changes — abstracted out cloneUrl and alias formatting, and I changed the way the env. variables are defined.

I double checked to see if it works, and it still does! 🎉

zpnk commented 7 years ago

@hugomd Thanks for the changes! I'm going to merge this - really appreciate your hard work! 👏