rajivrnair / upsource-slack-api-adapter

Simple adapter to transform Upsource's webhook to Slack's format.
Do What The F*ck You Want To Public License
13 stars 12 forks source link

allow supplying a slack channel's name as a query parameter #7

Closed grzegorznowak closed 7 years ago

grzegorznowak commented 7 years ago

Hey man,

I've added an option to supply channel name as a query parameter, the usage is as follow

http://endpoint.address.domain:4000?channel=channel-name-without-hash

the motivation was to be able to expose a single endpoint and use it for the lots of channels we have under our slack.

Please review the codes, expressjs and node are not my day-to-day techs. Thanks!

rajivrnair commented 7 years ago

Thanks @grzegorznowak . It looks good but is the Maybe monad really necessary? Won't a simple lodash isEmpty do (https://lodash.com/docs/#isEmpty)?

I've merged your change but I'll probably remove the Maybe monad if you have no objection.

grzegorznowak commented 7 years ago

hey sure @rajivrnair , it probably isn't necessary at all. I had a different idea in the first place, but then, due to lack of a single, solid functional library for JS (or I couldn't find one is all), I abandoned it altogether. Thanks for the merger. We have one more thing on our list, which is to add linkage from slack message to actual upsource urls. So will be pulling more requests soon I guess