# How to add conditions to pipelines?

**URL:** <https://drone.discourse.group/t/how-to-add-conditions-to-pipelines/9836>\
**Category:** Drone Support\
**Created:** [September 13, 2019, 3:58pm UTC](https://drone.discourse.group/t/how-to-add-conditions-to-pipelines/9836 "2019-09-13T15:58:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vityafx](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/vityafx/32/4266_2.png) [@vityafx](https://drone.discourse.group/u/vityafx)\
**Post date:** [September 13, 2019, 3:58pm UTC](https://drone.discourse.group/t/how-to-add-conditions-to-pipelines/9836/1 "2019-09-13T15:58:16Z")

</div>

I have 3 pipelines: `correctness`, `release` and `notify`. I want the first one to be triggered only for pull requests, release for pushes to master, and notify after all of these. I have specified “when” conditions for all the pipelines:

```auto
kind: pipeline
name: correctness
clone:
  disable: true
when:
  event:
  - pull_request
  branch:
  - master

---

kind: pipeline
name: release
when:
  event:
  - push
  branch:
  - master

---

kind: pipeline
name: notify
when:
  event:
  - pull_request
  - push
  branch:
  - master

```

However, all of them are triggered on non-master branches. It was told in the documentation that in order to trigger, all of the conditions must be met. Am I missing something?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [September 13, 2019, 4:14pm UTC](https://drone.discourse.group/t/how-to-add-conditions-to-pipelines/9836/2 "2019-09-13T16:14:11Z")

</div>

see [https://docs.drone.io/pipeline/docker/syntax/trigger/](https://docs.drone.io/pipeline/docker/syntax/trigger/)

---

<div class="post-metadata">

**Author:** ![vityafx](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/vityafx/32/4266_2.png) [@vityafx](https://drone.discourse.group/u/vityafx)\
**Post date:** [September 20, 2019, 8:44am UTC](https://drone.discourse.group/t/how-to-add-conditions-to-pipelines/9836/3 "2019-09-20T08:44:59Z")

</div>

Yes, this is the answer. Instead of `when` the `trigger` should be used, the syntax is the same.
