# What's the event after merging a pull request

**URL:** <https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861>\
**Category:** Drone Support\
**Created:** [October 4, 2018, 8:35am UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861 "2018-10-04T08:35:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zfilali](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zfilali/32/5459_2.png) [@zfilali](https://drone.discourse.group/u/zfilali)\
**Post date:** [October 4, 2018, 8:35am UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861/1 "2018-10-04T08:35:00Z")

</div>

Hi,

I’m trying to deploy my code after merging a PR from github, I tried the event `push` but it didn’t start the deployment step, here is the code

```
deploy:
    image: drillster/drone-rsync
    hosts:
      - myHost1
    source: /tmp
    target: ~/packages
    include:
      - "workflow-${DRONE_COMMIT_SHA}.tar.gz"
    exclude:
      - "**.*"
    script:
      - cd ~/packages
      - ls -la
      - tar -xf workflow-${DRONE_COMMIT_SHA}.tar.gz -C /home/workflow/www
      - cd /home/workflow/www
    secrets: [rsync_user, rsync_key]
    when:
      branch: master
      event: push
```

---

<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:** [October 4, 2018, 8:38am UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861/2 "2018-10-04T08:38:24Z")

</div>

When you merge a pull request it creates a push event. You can see where we use similar syntax in our official Drone configuration:

> <https://github.com/drone/drone/blob/master/.drone.yml#L40:L48>

---

<div class="post-metadata">

**Author:** ![zfilali](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zfilali/32/5459_2.png) [@zfilali](https://drone.discourse.group/u/zfilali)\
**Post date:** [October 4, 2018, 8:53am UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861/3 "2018-10-04T08:53:43Z")

</div>

that’s weired, I mean I use the same event but it’s not triggering the build, is there somewhere how to debug the event sent from Github ?

---

<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:** [October 4, 2018, 3:18pm UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861/4 "2018-10-04T15:18:59Z")

</div>

> it didn’t start the deployment step  
> it’s not triggering the build

I think I’m a little confused. Is the build being triggered, and the deployment step in your yaml being skipped? Or is the build not being triggered at all? This is a very important detail here.

> it’s not triggering the build

If a build is not triggered, drone will _always_ write a debug message to the server logs indicating why it was skipped. You can view the server logs by running `docker logs <container>`. Note that you have to have debug logs enabled.

> is there somewhere how to debug the event sent from Githu

you can go to your repository settings in github and see every single webhook that was sent to drone. I doubt you will find any useful information in github, unless the webhook delivery completely failed. Otherwise, you will get the most useful details from the Drone server logs.

---

<div class="post-metadata">

**Author:** ![zfilali](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zfilali/32/5459_2.png) [@zfilali](https://drone.discourse.group/u/zfilali)\
**Post date:** [October 7, 2018, 5:58am UTC](https://drone.discourse.group/t/whats-the-event-after-merging-a-pull-request/10861/5 "2018-10-07T05:58:33Z")

</div>

Thank you for your help, no the build wan’t triggered, cause I had push deactivated in Drone UI configuration.
