When I open a pull request in my Github repository I should get two events: pull_request and push, right? But really in my starlark script, I get only push event. I think that happens by the memoization that drone does when sees the first event push.
Moreover, when I push the same commit to another branch, I get no events!
When I added event type (req.Build.Event) to the cache key like:
// cache key pattern used in the cache, comprised of the
// repository slug and commit sha and event type.
const keyf = "%d/%s/%s"
key := fmt.Sprintf(keyf, req.Repo.ID, req.Build.After, req.Build.Event)
It is also works good!
EDIT: I can make a PR, if the above solution is OK.
I also get this issue, only for me upon pushing to a branch when a PR is open, it runs both intended builds as a push event.
I upvote a fix for this.
In the mean time I’m forking your proposition. Thanks for offering a solution
I was just about to edit my message.
Indeed I was still running v1.4, I just updated to 1.6.4 and it resolves the issue (after I figured that the v1.5 added the DRONE_AGENTS_DISABLED variable that is xD).