My build is triggered on every push to the repo and on every pull request.
So CODEBUILD_SOURCE_VERSION looks like "pr/8" or "4570d2e7158cfef687af8da31d1ffec7b02e5ca3".
I only want the build to execute for pr branches and pushes to master. What is the best way to achieve this? I don't want to use CodeDeploy as I am just deploying lambdas.
I could write a bash function that checks CODEBUILD_SOURCE_VERSION on the install phase and does an exit 1. But this will create a lot of false positives in our slack channel as these are not really "failed builds".