Skip to content

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

Closed
@thomsh

Description

@thomsh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions