Is there a way to enable git post on AWS CodeCommit Push Trigger Notifications?

I have a codecommit repository.

I have a trigger setup with "Send to" = "Amazon SNS".

On SNS, I have email subscribers connected to a notification event.

As a result, the developers of the project receive an email every time any developer pushes git against the repo.

The email looks like this:

enter image description here


Is there a way to add a git push or commit message to this notification?

+3


source to share


1 answer


While this information is not provided directly from the trigger payload, it does provide a list of reference updates. Every new / updated link (often a branch) contains a commit ID. If you were configuring an AWMS Lambda trigger, you can get these commit IDs from the trigger payload and then use them using the CodeCommit 'GetCommit' api to retrieve the commit message. Then you can submit your new payload to SNS for emailing.

GetCommit info: http://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetCommit.html



Example for Configuring Lambda Launch with AWS CodeCommit: http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html

+3


source







All Articles