# Mergine pull request in Gitea results on 2 builds

**URL:** <https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580>\
**Category:** Drone Support\
**Created:** [September 5, 2019, 1:16pm UTC](https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580 "2019-09-05T13:16:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![metal3d](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metal3d/32/4750_2.png) [@metal3d](https://drone.discourse.group/u/metal3d)\
**Post date:** [September 5, 2019, 1:16pm UTC](https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580/1 "2019-09-05T13:16:23Z")

</div>

Hi,

There is something that I don’t understand with Drone 1.1.0.

I’m using Gitea and almost everything is OK for me. Pull requests are detected, build and deployments works.

Because Gitea doesn’t send good event when I create a release (the tag event is not sent), we decided to use the master branch and make a deployment when pull request is merged.

So, we added that:

```
kind: pipeline
name: build-staging

steps:
[... several steps here ...]

trigger:
  event:
    - push
  branch:
    - master

```

The problem is that 2 builds are launched as soon as we press “merge request”.

It’s like triggers are “OR” and not “AND” it seems.

If I’m using conditions (`when`) without trigger, there will be an empty build each time I accept PR. The build will clone, and nothing more.

Is this a Gitea problem (maybe it sends 2 events), or something to make in trigger ?

Thanks a lot !

---

<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 5, 2019, 4:13pm UTC](https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580/2 "2019-09-05T16:13:36Z")

</div>

the only way for the system to execute two builds is for Gitea to send two webhooks.

---

<div class="post-metadata">

**Author:** ![metal3d](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metal3d/32/4750_2.png) [@metal3d](https://drone.discourse.group/u/metal3d)\
**Post date:** [September 6, 2019, 8:11am UTC](https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580/3 "2019-09-06T08:11:20Z")

</div>

Ok, that’s weird but that seems to be the case… I will try to check gitea issues if someone reports the same. Thanks for your anwsers 🙂

---

<div class="post-metadata">

**Author:** ![metal3d](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metal3d/32/4750_2.png) [@metal3d](https://drone.discourse.group/u/metal3d)\
**Post date:** [September 12, 2019, 12:16pm UTC](https://drone.discourse.group/t/mergine-pull-request-in-gitea-results-on-2-builds/10580/4 "2019-09-12T12:16:25Z")

</div>

I checked and Gitea is now updated with a fix for that issue: [https://github.com/go-gitea/gitea/issues/7702](https://github.com/go-gitea/gitea/issues/7702)

I confirm that it works now. One more time, great job for Drone
