Limit triggers of .snap building from a git source

Hello,

is there a way to limit triggers of new building from a git source? Like limiting it to some branch only (‘main’ for example), or able to switch completely to ‘manual trigger new building’ in web interface. Why it is needed: sometimes it needs to test and commit interim code, or to put specific code in other branches, and I’d not wanted to trigger snap rebuilding on snapcraft in this case.