How to catch commits to opened pull requests?

Hey,
I have two pipelines:

  1. One for opening pull requests:
    trigger:
    branch:
    • master
  2. And second one after pull request is merged:
    trigger:
    branch:
    • master
      event:
    • push

Currently when pull request is merged to master, then first pipeline is reached. How can I avoid this? I would like to start first pipeline only in two cases:

  1. Pull request opened against master
  2. Commit made to opened pull request

you would change to the following:

trigger:
  event:
  - pull_request
  branch:
  - master
1 Like

Perfect, thank you. Can you explain me how is it working with catching also commits to opened merge requests?

merge requests and pull requests are synonyms (Drone uses GitHub terminology). The pull_request event types encompasses creating and synchronizing a pull request.