In the project I am currently working on, I want to run the bitbucket pipeline according to the following rules.
- Test and lint steps should run for each commit pushed to Branch.
- The test-with-coverage and lint steps must be run for each record opened with Pull Request.
The problem here is that if I push a commit to a branch that I have opened a pull request, the pipeline is triggered twice.
pipelines:
default:
- step: *lint
- step: *test
pull-requests:
'**':
- step: *lint
- step: *test-with-coverage
I looked for a way to skip default pipeline if a pull request exists, but I can't find it. I am open to suggestions and opinions.