slackcamp
slackcamp copied to clipboard
Add rudimentary OAuth; Tidy-up; Add option of function to map projects to channels
This PR contains some reorganisation and two new features we needed in-house:
- OAuth 2.0 flow: unfortunately, as noted in the README the security gained by using OAuth isn't actually as significant as I'd like. It's rudimentary, but implemented without any extra dependencies.
- Basecamp to Slack mapping as a function: Rather than the static array to map Basecamp project names to Slack channels (which is still supported) you can specify a callable/function to determine the Slack channel algorithmically (eg. based on Basecamp project description), and to filter messages (eg. discard "completed to-do", "moved" events; by returning an empty channel from the function)
There are some other small changes included too. I realise it's a reasonably substantial PR, so feel free to cherry-pick, or reject entirely!
Thanks for the contributions @tomgidden! I've been really busy, but I'll review this when I get a chance.