Closed
Description
- Gitea version (or commit ref): 1.1.0
- Git version: 2.1.4
- Operating system: (Debian stable)
- Database (use
[x]
):- PostgreSQL
- Can you reproduce the bug at https://try.gitea.io:
- Log gist:
Payload:
https://gist.github.com/theznx/5fd861a1a84207ce5655fd48cd8a6a80
Description
Hello,
We think we found a problem in the webhook's payload:
When we merge a PR (on the web interface) the payload contain a wrong hash:
In the after
field, the hash refer to the last commit in the merged branch instead of the hash of the merge commit.
Droneio then build the destination branch but do reset --hard
with the hash fromt he after
field.
This introduce multiple problems :
- we are building a commit with a hash which never existed on this branch.
- if in the destination branch commits were made after the fork point, they are not included in the build.
- the merge commit on the destination branch is never build.
If we merge the branch localy and we push, the field after
in the payload reference the merge commit: no problem.
On try.gitea.io, we configured a webhook to a bad url, it's not relevant for this test, you can view the payload for the last events.
Other informations:
- We use Droneio version 4.2 as CI
- Github always reference the merge commit in the payload.