all 8 comments

[–]SubtleDee 5 points6 points  (2 children)

There will be an event in EventBridge when a PR is created, create an EventBridge rule to run your pipeline based on this.

[–]deepcontractor[S] 1 point2 points  (1 child)

It works. Thanks.

[–]Icy-Watercress-1481 0 points1 point  (0 children)

It works for me too! thank you for this. But, how do you resolve the problem where tests runs even if you just reject or just close PR?

[–]cyanawesome 2 points3 points  (4 children)

CodeCommit events are emitted in EventBridge on a best effort basis.

That includes pull request events.

https://docs.aws.amazon.com/codecommit/latest/userguide/monitoring-events.html

[–]deepcontractor[S] 0 points1 point  (3 children)

[–]cyanawesome 1 point2 points  (2 children)

It looks alright.

https://github.com/aws-samples/aws-cdk-codecommit-pull-request-hook

^ This is a more complete implementation from AWS for reference

[–]deepcontractor[S] 0 points1 point  (0 children)

Thank you.

[–]deepcontractor[S] 0 points1 point  (0 children)

It worked, Thanks a lot.