amazon web services – Using the “draft” feature of a GitHub PR to stop AWS CodeBuild from building on a PR change

I’ve set up a CD pipeline from Github to ECS for a non-profit I’m working for. The AWS CodeBuild starts every time a PR is opened, changed, or merged. Sometimes, however, PRs are opened but marked as drafts. In such cases, it’s unnecessary to start builds. Is there a way to set up CodeBuild as to not build when a PR is in draft mode? I know that the webhook POST data that Github sends contains a key draft: boolean, but I can’t figure out how to use it in CodeBuild. Any hints would be highly appreciated!