Serverless API endpoint for those who need to power up their GitHub vanity star style.
GitHub webhook WatchEvents posted nicely to your Slack channel of choice
serverless-python-requirements
#Install serverless-python-requirements
npm install serverless-python-requirements
First go to your Slack account and get the webhook setup for your room you want to publish messages into This will be a variable input for the serverless deployment
sls deploy --slack_webhook_url https://hooks.slack.com/services/T2P8JM69M/B6R0F2KJR/qsuperuniquehookid
Serverless: Generated requirements from /Users/myuser/src/stargazer/requirements.txt in /Users/myuser/src/stargazer/.serverless/requirements.txt...
Serverless: Installing requirements from /Users/myuser/src/stargazer/.serverless/requirements/requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python3.6
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (2.9 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............
Serverless: Stack update finished...
Service Information
service: stargazer
stage: dev
region: us-west-2
stack: stargazer-dev
api keys:
None
endpoints:
POST - https://XXXXXXXX.execute-api.us-west-2.amazonaws.com/dev/stargazer
functions:
stargazer: stargazer-dev-stargazer
Take your new AWS Gateway endpoint output and apply to your Github webhook configuration. This can be done at a Github project or repository level.
Click the "Let me select individual events" option, then choose the "Watch" event at the bottom of the list.