0

My drone CI server configured a webhook for several events on a private bitbucket cloud repository, among those events are several pull request related events (create, update, decline and more). I configure the following pipeline on my repository

# .drone.yml
kind: pipeline
type: docker
name: default
steps:
- ...

trigger:
  event:
  - pull_request

I expect this pipeline to be executed when I open a pull request but this does not happen, instead drone outputs the following messages

{"level":"debug","msg":"webhook ignored","time":"..."}

{"fields.time":"...","latency":...,"level":"debug","method":"POST","msg":"","remote":"...","request":"/hook?secret=...","time":"..."}

When I decline or trigger other pull request related events I see by the debug messages drone is receiving them correctly. When I trigger the pipeline with the push event it is correctly executed and the results are communicated to bitbucket without an issue. When I compare the headers (for request and response) of a pull request decline event (correctly detected by drone) and a pull request create event (ignored by drone) both look very similar.

Drone version: 1.10.1 Docker runner version: 1.6.2

dmbarreiro
  • 154
  • 2
  • 10

2 Answers2

1

Drone does not support pull request events for bitbucket cloud at the moment.

Bitbucket also has an open issue about this.

Aleksei Chernenkov
  • 991
  • 1
  • 8
  • 23
dmbarreiro
  • 154
  • 2
  • 10
1

You can use directly ref instead of event

trigger:
  ref:
  - refs/pull/*/head

ref: https://docs.drone.io/pipeline/triggers/

Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254