AWS Lambda script to recieve email notifcation when someone stars your GitHub repository.
Set up an AWS Lambda function with an API gateway endpoint (POST method) that triggers this lambda function. The code for the Lambda function is in index.js.
The following environment variable needs to be configured for the function to work properly.
- RECEIVER_EMAIL: EmailID to which the notification email should be sent to.
- SOURCE_EMAIL: EmailID to which the notification email should be sent from.
The Lambda function should be given the appropriate permissions to send email.
A new webhook needs to be created in all the repositories that should be alerted on. The webhook should be setup to recieve only watch
events. See watch event documentation.
Instruction for creating a webhook: GitHub webhooks documentaiton