Pipeline should be trigger branch wise

Hi,

I have two different k8s cluster in rancher management. same Git Lab is integrated with both clusters. on Git Lab side, I have one repository and there are two branch inside it (dev, test).
I want to trigger “dev” branch in cluster A only. and “test” branch cluster B only.

facing issue is:

When I commit anything in dev branch, pipeline is triggering in both cluster. same for test branch case as well.