Setting Environment Based on Branch

Question:
Is there a way to configure an environment according to the selected branch?

Karan

jam_zaw You can create an environment that only runs API within the selected branch

melo thanks for the reply; can explain how to do that please?

I think I misunderstood your meaning, I want to confirm what you specifically meant.

So we have the same need :innocent:
Karan

jam_zaw I think what you meant is setting some branch scoped variables no matter what environment selected that can changed based on branch not environment. Right? For now, it doesn’t support this way. But you can always utilize the pm.request.getBaseUrl() to identify different backbend.

Can you share more details about why you need this in the first place? That will definitely help us understand more your scenario.