Why does drone CI ignore the closing of a pull request?
I need to remove temporary containers when the request is closed (merged or unmerged).
What are some ways to solve this problem? Thanks
There is a thread on this here - GITEA closed pull request ignored
I’m afraid this matches travis and circle CI’s functionality
Yes, I’ve seen this thread, but it doesn’t provide answers to:
- Why is there no such functionality in Drone specifically? How is it tied to travis and circle?
- Are there other ways to implement
I haven’t looked into the closed PR example in particular but the reason is likely due to the differences in how git providers expose different events.
Drone uses GitHub - drone/go-scm: Package scm provides a unified interface to multiple source code management systems. which is an interface for the different SCM flavours - each SCM providers handles webhooks differently
e.g. according to the comment here - go-scm/webhook.go at 5f3c26274ccaf748b36ee9a29bf1363f37b7ee87 · drone/go-scm · GitHub - github does not have the concept of a merge event where as gitlab and bitbucket do.
And then we have to consider gitea, gogs, stash etc. etc. it’s all handled differently - and in some cases it may not be handled at all.
Have you tried the approach mentioned in the other thread?
trigger:
event:
- pull_request
action:
- closed
Which SCM are you using? it may be that your SCM does not have an action called closed.
Im using gitea + drone, gitea sends a webhook request to close the pull request, this is absolutely correct, drone ignores this request
I tried
trigger:
event:
- pull_request
action:
- closed
and
trigger:
event:
- pull_request
without action, it gives no results
Gitea sends the following webhook on a PR close, which is (as mentioned already) ignored by Drone.