This repository contains a lambda function that receives GitHub Board updates (via GitHub Webhook) and forwards them to Slack. It allows the user to select which Slack channels get notified when a change is received.
The setup looks more difficult than it is, the steps in the overview should be easy to follow.
- Install Serverless cli (with AWS)
- Get access to Slack API to create apps
- Have privis' to add Webhooks to your org, url looks like so
https://github.com/organizations/<YOUR ORG NAME>/settings/hooks
-
Set up a Slack App, extract the newly generated Verification Token and the OAuth Token

-
Set up a Personal Github Token for the bot; give it repo access - here

-
Decide on the
GITHUB_WEBHOOK_SECRETor generate one -
Configure the function, see below
-
Deploy the function:
$ sls deploy -
Set up a GitHub Webhook using the
URLand theSECRET; Only give it permissions to boards
-
Finish up the Slack App configuration, see below
-
done 💪
Copy serverless.yml.sample into serverless.yml and change your vars in the
environment section.
$ cp serverless.yml.sample serverless.yml
GITHUB_TOKEN- Your personal GitHub tokenGITHUB_WEBHOOK_SECRET- The secret you've configured on the webhook in GitHubGITHUB_ORG- Your organisations' name as defined on GitHub (in the url)SLACK_OAUTH_TOKEN- The oauth token of your Slack app, super importantSLACK_VERIFICATION_TOKEN- This token is used to verify that the request is actually coming from slack (similar to theGITHUB_WEBHOOK_SECRETbut generated by Slack)
- Under Interactivity & Shortcuts add a Request URL, something like
<BASE URL>/dev/slack/events
- Under Slash Commands, proceed to Create a new command set the Command as
/list-projectswith the same Request URL
- Under OAuth & Permissions > Bot Token Scopes, proceed to Add an OAuth Scope, add
chat:write
$ sls logs -f github
$ sls logs -f slack Also --tail will give you a running log.
$ nvm use 12
$ sls invoke local -f slack -p ./fixtures/move.json



