I have a codecommit repo.
I have a push trigger setup with a "Send to" = "Amazon SNS".
At SNS, I have some email subscribers hooked up to the notification event.
As a result, the project developers receive an email each time any developer executes a git push against the repo.
The email looks similar to:
Is there a way to add the git push or commit message in that notification?
While that information is not provided directly from the trigger payload, it does provide a list of reference updates. Each new/updated reference (often a branch) contains the commit ID. If you were to configure an AWS Lambda trigger, you could get these commit IDs from the trigger payload, then use them with CodeCommit's 'GetCommit' api to retrieve the commit message. Then you could send your new payload to SNS for emailing.
Information on GetCommit: http://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetCommit.html
Example Lambda trigger setup with AWS CodeCommit: http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With