We recently started using pipeline for our open-source Mercurial project ControlsFX and we love it 
Pipeline Details
We have 2 different branches - default and 9.0.0. We want to run default only when a PR targeted to default branch is merged. Similarly, run 9.0.0, when a PR targeted to 9.0.0 branch is merged.
pipelines:
branches:
default:
- step:
name: Build and assemble default branch
image: cogniteev/oracle-java:java8
caches:
- gradle
script:
- chmod +x gradlew
- ./gradlew clean assemble
9.0.0:
- step:
name: Build and assemble 9.0.0 branch
image: abhinay/oracle-java:java10
caches:
- gradle
script:
- chmod +x gradlew
- ./gradlew clean assemble
Problem
After introducing the change to pipeline for branches, it has been running twice for the same commit. We are not sure what's going wrong.
We appreciate the help.
Thanks.