Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook: on merge wrong hash in the after field #1350

Closed
2 tasks done
thomsh opened this issue Mar 21, 2017 · 2 comments · Fixed by #1746
Closed
2 tasks done

Webhook: on merge wrong hash in the after field #1350

thomsh opened this issue Mar 21, 2017 · 2 comments · Fixed by #1746
Labels
Milestone

Comments

@thomsh
Copy link

thomsh commented Mar 21, 2017

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.
@lunny lunny added this to the 1.2.0 milestone Mar 21, 2017
@lunny lunny added the type/bug label Mar 21, 2017
@strk
Copy link
Member

strk commented Mar 22, 2017

Sounds like milestone should be 1.1.x too

@lunny
Copy link
Member

lunny commented Mar 22, 2017

If one bug is on master and effected previous versions, we will mark it last milestone and backport to old version if needed.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants