查询单个合并请求详情。
接口说明
该接口需要确保当前企业已经在使用新版 MR,具体可看当前企业的合并请求页面是否已是新版本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
GET /api/v4/projects/{repositoryId}/merge_requests/{localId}/detail
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
|---|---|---|---|---|
| organizationId | string | 是 | 企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】 | 5ebbc0228123212b59xxxxx | 
| accessToken | string | 否 | 个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段 | f0b1e61db5961df5975a93f9129d2513 | 
| repositoryId | long | 是 | 代码库 ID | 2464454 | 
| localId | long | 是 | 合并请求局部 ID,表示代码库下的第几个合并请求 | 1 | 
返回参数
示例
正常返回示例
JSON格式
{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorMessage": "\"\"",
  "errorCode": "Openapi.RequestError",
  "success": true,
  "result": {
    "mrBizId": "bca90244c4b749e0b109df52ac0eb570",
    "projectId": 2369234,
    "localId": 1,
    "createTime": "2023-05-30T02:53:36Z",
    "updateTime": "2023-05-30T02:53:36Z",
    "mrType": "CODE_REVIEW",
    "sourceProjectId": 2369234,
    "sourceBranch": "test-merge-request",
    "targetProjectId": 2369234,
    "targetBranch": "master",
    "title": "test-合并请求标题",
    "description": "test-合并请求的具体描述内容",
    "reviewers": [
      {
        "id": 90452,
        "name": "test-codeup",
        "username": "root-test-codeup",
        "state": "active",
        "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
        "email": "username@example.com",
        "hasReviewed": false,
        "reviewOpinionStatus": "NOT_PASS",
        "reviewTime": "2023-05-30T02:53:36Z",
        "hasCommented": true
      }
    ],
    "author": {
      "id": 19927,
      "name": "test-codeup",
      "username": "root-test-codeup",
      "state": "active",
      "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
      "email": "username@example.com"
    },
    "subscribers": [
      {
        "id": 90452,
        "name": "test-subscriber",
        "username": "test-subscriber",
        "state": "active",
        "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
        "email": "username@example.com"
      }
    ],
    "status": "UNDER_REVIEW",
    "createFrom": "WEB",
    "ahead": 1,
    "behind": 1,
    "todoList": {
      "requirementCheckItems": [
        {
          "itemType": "COMMENTS_CHECK",
          "pass": true
        }
      ]
    },
    "allRequirementsPass": true,
    "supportMergeFastForwardOnly": true,
    "detailUrl": "xxx",
    "webUrl": "xxx",
    "targetProjectNameWithNamespace": "orgId / test-group / test-target-repo(斜杠两侧有空格)",
    "targetProjectPathWithNamespace": "orgId/test-group/test-target-repo",
    "mergedRevision": "1a072f5367c21f9de3464b8c0ee8546e47764d2d"
  }
}错误码
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 | 
|---|---|---|
| 2024-01-29 | OpenAPI 返回结构发生变更 | 查看变更详情 | 
| 2024-01-11 | OpenAPI 返回结构发生变更 | 查看变更详情 | 
