私有化部署使用api偶尔出问题

你好,我私有化部署gitlab后,使用下面这个api(/api/v4/projects/:id/merge_requests?scope=all),发现这个api返回值中的字段(user_notes_count)的值偶尔不正确,比在gitlab的页面上看的不一致。试了很多次,只是偶尔会出问题,没有任何报错,只是值不正确。想问下这个是官方api的问题嘛,还是跟私有化部署有什么关系嘛?

测试:页面上在mr详情评论,此时页面上的mr列表上此条mr的评论数量角标是1,而api返回的是0

过了一会可能就好了 所以想问下这个api是做了什么缓存导致的嘛

我这边测试了下,这里确实有点问题,感谢您的反馈,我们也会反馈到研发那边。

你好 我还有一个问题:针对于 Discussions API | GitLab

A line code is of the form <SHA>_<old>_<new>, like this: adc83b19e793491b1c6ea0fd8b46cd9f32e292fc_5_5

  • <SHA> is the SHA1 hash of the filename.
  • <old> is the line number before the change.
  • <new> is the line number after the change.

请问下这个 “SHA” 是需要我根据filename自己生成一个hash嘛,我看没有api给这个filename的hash,我用于多行diff评论,这个api没使用明白,方便讲解下嘛

我使用post请求传了form参数:position[line_range][end][line_code]:“8ec9a00bfd01b3190ac6b22251dbb1aa95a0579d_7_8” 和 position[line_range][start][line_code]:“8ec9a00bfd01b3190ac6b22251dbb1aa95a0579d_1_1”。

响应的报错如下:
{
“message”: “400 Bad request - Note {:line_code=>[“can’t be blank”, “must be a valid line code”], :position=>[“is incomplete”]}”
}

入参结构我是参考的api文档,但是这个line_code看样子还是没找到,hash我是从api中拿的已存在的文件的hash