Differentiate between New Branch and Commit [Bitbucket]

Hi guys,

Is there an way to to differentiate between a New Branch and Commit before actually running a build?

I only want to build on new “feature/XX” branches (or pull requests from them) but not commits to these branches. Unfortunately, my current solution requires a build to determine whether the pipeline should continue or not, is there a way to avoid this? It’s not a massive issue it’ll just be showing NOT_RUN builds every time a commit made or we can play about with creating branches from feature for actual dev as a workaround.

(Also to note I’m not looking to create API of BK and currently working with Bitbucket and BK)

Cheers again for any help provided,

Hey Mitch! :wave:

Interesting! In your Bitbucket Settings, you can check the option of “Build branches”, and uncheck the rest, so it runs builds when branches are pushed to your repository. But what we received from Bitbucket is limited, and we can’t distinguish between a pushed commit of a new branch, or a push commit to an already created branch.