I have been setting up a CICD pipeline for a project contained entirely within AWS but the problem I've run into is that I'm struggling to find out how to use pull requests rather than merges to trigger a build. My project lead wants to not run a test environment, but to run the tests on any PR and have them pass as part of the acceptance criteria for merging the PR into main, I've not managed to find any mention of this possibility in the CDK docs even for GitHub so I'm not sure if I'm missing something or if it's just not an option within the framework.
I have managed to put together code for a test environment/prod environment setup in TypeScript CDK but can find no way to adapt this to our desired configuration.