Hi,
I’ve got everything working as expected, except I cannot deploy from a PR. Steps to reproduce:
- Create a branch off master. Add a change. Commit and push to GH.
- Create a PR on GH.
- Assuming the PR build succeeds, promote it to deploy that build to an environment:
deploy username/repo build environment
I expect the latest commit in the PR to be deployed but I get this error instead:
+ git init
Initialized empty Git repository in /drone/src/github.com/username/repo/.git/
+ git remote add origin https://github.com/username/repo.git
+ git fetch --no-tags origin +refs/pull/1/merge:
From https://github.com/username/repo
* branch refs/pull/1/merge -> FETCH_HEAD
+ git reset --hard -q 1c5d042a0d3ac08b609344f9a246ec6f11d7cf13
fatal: Could not parse object '1c5d042a0d3ac08b609344f9a246ec6f11d7cf13'.
exit status 128
The clone task at the beginning of the pipeline is not finding the correct commit. I assume the git reset works differently with PR refs. It’s not a race condition, the deployment fails repeatedly. Any advice or help?