Skip to content

List merge requests API 获取MR结果异常

List merge requests API 在某些情况下会得到异常结果,并且稳定复现,目前怀疑是一个BUG。

复现流程:

  • 版本:16-17

  • username:test ;userid:12

  • 审批设置:
    image

  • 创建MR:UAT分支到APP分支。 image

  • API参数:https://gitlab.example.com/api/v4/merge_requests?state=opened&approver_ids[]=12&scope=all,调用这条API不应该获得iid=16的这条MR。不符合我们下面设置的参数条件。

    • approver_ids[]=12

    • scope=all

    • state=opened

  • 异常现象:"title": "Update 2 files","project_id": 1664,“iid”:16这个MR,可以通过API获取得到。
    image

同样的问题,还有一种途径可以出现

  • 同样的创建MR,UAT分支合并到APP分支,同时在MR级别设置审核人。
    image image
  • API参数:https://gitlab.example.com/api/v4/merge_requests?state=opened&approver_ids[]=12&scope=all,调用这条API应该获得iid=18的这条MR。
  • 异常:通过API获取不到这个MR。没有iid=18的这条MR
gy tao 编辑于