在 MR 中,不同的 commit 触发 webhooks 的 updated_at 时间一致,无法分辨哪个 commit 是 latest
Summary
客户反馈,在mr中,两笔间隔时间比较近的commits,基于webhooks的合并请求事件,在webhooks请求中看到的mr的updated_at是一致的,无法判断哪个commit是最新的提交。
Steps to reproduce
1、项目配置webhooks,选择合并请求事件
2、创建一个项目的mr
3、在mr中做多笔提交,可以尝试将多笔提交的时间间隔控制的比较接近(如打开多个窗口,同时提交)
4、去webhooks中查看webhooks的请求
Example Project
saas 复现
项目地址:https://jihulab.com/cs-test-group1/kxwang/ceshi-1/
webhooks:
- https://jihulab.com/cs-test-group1/kxwang/ceshi-1/-/hooks/6312/hook_logs/3953520
- https://jihulab.com/cs-test-group1/kxwang/ceshi-1/-/hooks/6312/hook_logs/3953519
自管理复现
也就是说,在mr中提commit,如果commit之前的时间间隔很近,虽然commit的创建时间有前后差异,但是在webhooks中的更新时间确实一致了,这样就会导致客户无法根据webhooks中的请求去判断那个commit是latest。
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
由 王凯旋 编辑于



