Cloning failed in Github Deployment


Thank you for the implementation of Drone.
I have encountered the situation that cloning has failed for the promote event. The error message is as below.

+ git fetch origin +refs/tags/11d8ccc32ed82ba423d341c5ed3c7115ed0b0014:
fatal: Couldn't find remote ref refs/tags/11d8ccc32ed82ba423d341c5ed3c7115ed0b0014

I’m using Drone for the public repository of Github. I hope you reply it.

Hmm, we received and merged a patch to fix this quite a while back …

I’ve encountered the issue in the original post that isn’t addressed by that patch.

I’m creating a GitHub deployment where the ref parameter is a SHA, but when Drone parses the deployment webhook it doesn’t seem to take that case into account:

Drone prepends refs/tags to the SHA, which causes results in getting the wrong clone type downstream.

This bug looks related:

Thanks for the analysis. Perhaps the payload is different depending on whether or not you are promoting a tag, a commit or a pull request. As a next step, we would kindly as that you provide a sample hook payload that we can use to reproduce. We will create a unit test using the sample payload, which should allow us to patch accordingly.

Thanks, @ashwilliams1. Here you go: