Github deployments trigger bad cloning stage

I have a simple pipeline that is triggered by a deployment event in github. When it gets to the cloning stage, it always fails since it tries to clone from a weird ref.

kind: pipeline
type: docker
name: testing

steps:
- name: test
  image: busybox
  commands:
  - printenv

trigger:
  event:
  - promote
  target:
  - production

Drone always tries to append a refs/heads/ to the ref sent by the event when it is should just be the commit SHA.

curl -X POST \
  https://api.github.com/repos/***/***/deployments \
  -H 'Authorization: Basic *************************************' \
  -H 'Content-Type: application/json' \
  -d '{
  "ref": "*************************************145",
  "auto_merge": false
}'
Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/*************************************145:
fatal: Couldn't find remote ref refs/heads/*************************************145

even when trying to use a head of a branch as a trigger, it still appends a refs/heads/ to the head ref, failing the cloning stage

curl -X POST \
  https://api.github.com/repos/***/***/deployments \
  -H 'Authorization: Basic *************************************' \
  -H 'Content-Type: application/json' \
  -d '{
  "ref": "refs/heads/test-triggers",
  "auto_merge": false
}'
Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/refs/heads/test-triggers:
fatal: Couldn't find remote ref refs/heads/refs/heads/test-triggers
1 Like