Gitlab webhook merge requests don't pass squash commit sha in body

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Gitlab webhooks events don't pass squashed commit SHA in the body when clients are using squash & fast-forward merge.

Steps to reproduce

  1. setup webhook
  2. set Merge method to `Fast Forward Only`
  3. prepare PR with 2 commits
  4. select Squash commits in MR
  5. merge MR
  6. observe in the webhook data that no `merge_commit_sha` is passed & that the last commit is useless since it points to the last commit non-squashed commit

Example Project

/ currently a private project, can open if needed

What is the current bug behavior?

No squash_commit_sha is passed in the webhook event, but it is passed in API call

What is the expected correct behavior?

squash_commit_sha is passed in the same as in API response

Edited by 🤖 GitLab Bot 🤖