# ListPullsByNumbers

## 原始 Swagger
https://api.cnb.cool/#/operations/ListPullsByNumbers

## 接口描述
根据 number 列表查询合并请求列表。List pull requests by numbers.
## 接口权限
repo-pr:r
## 请求信息

**请求方法：** GET

**请求地址：** ${CNB_API_ENDPOINT}/{repo}/-/pull-in-batch

### 请求头

| 请求头 | 值 | 必填 | 描述 |
|--------|----|----|------|
| Accept | application/vnd.cnb.api+json | 是 | 指定接受的响应格式 |
| Authorization | Bearer $CNB_TOKEN | 是 | 身份认证令牌 |


### 路径参数

| 参数名 | 类型 | 必填 | 描述 |
|--------|------|------|------|
| repo | 字符串 | 是 | 不带.git后缀的仓库名称。格式：`组织名称/仓库名称`|

### 查询参数

| 参数名 | 类型 | 必填 | 描述 |
|--------|------|------|------|
| n | 数组[字符串] | 是| Pull唯一标识编号|
## 响应信息


**响应类型：** 数组[api.PullRequestInfo]

**响应结构（数组元素）：**
```json
[
{
    "assignees": [{
      "avatar": "string", // 用户头像。
      "email": "string", // 用户邮箱。
      "freeze": false, // 是否冻结。
      "is_npc": false, // 是否是 NPC。
      "nickname": "string", // 昵称。
      "username": "string" // 用户名。
    }], // 处理人列表。
    "author": {
      "avatar": "string", // 用户头像。
      "email": "string", // 用户邮箱。
      "freeze": false, // 是否冻结。
      "is_npc": false, // 是否是 NPC。
      "nickname": "string", // 昵称。
      "username": "string" // 用户名。
    }, // 作者信息。
    "base": {
      "ref": "string", // 分支引用名称。
      "repo": {
        "id": "string", // 仓库ID。
        "name": "string", // 仓库名称。
        "path": "string", // 仓库路径。
        "web_url": "string" // 仓库Web访问地址。
      }, // 关联的仓库信息。
      "sha": "string" // 提交哈希值。
    }, // 目标分支信息。
    "blocked_on": "string", // 阻塞原因。枚举值：`no_merge_base`,`internal_error`,`code_conflict`,`status_check`,`waiting_review`
    "created_at": "string", // 创建时间。
    "head": {
      "ref": "string", // 分支引用名称。
      "repo": {
        "id": "string", // 仓库ID。
        "name": "string", // 仓库名称。
        "path": "string", // 仓库路径。
        "web_url": "string" // 仓库Web访问地址。
      }, // 关联的仓库信息。
      "sha": "string" // 提交哈希值。
    }, // 源分支信息。
    "labels": [{
      "color": "string", // 标签颜色。
      "description": "string", // 标签描述。
      "id": "string", // 标签ID。
      "name": "string" // 标签名称。
    }], // 标签列表。
    "last_acted_at": "string", // 最后更新时间。
    "mergeable_state": "string", // 可合并状态。枚举值：`checking`,`mergeable`,`merging`,`merged`,`conflict`,`no-merge-base`
    "merged_by": {
      "avatar": "string", // 用户头像。
      "email": "string", // 用户邮箱。
      "freeze": false, // 是否冻结。
      "is_npc": false, // 是否是 NPC。
      "nickname": "string", // 昵称。
      "username": "string" // 用户名。
    }, // 合并者信息。
    "number": "string", // Pull唯一标识编号。
    "repo": {
      "id": "string", // 仓库ID。
      "name": "string", // 仓库名称。
      "path": "string", // 仓库路径。
      "web_url": "string" // 仓库Web访问地址。
    }, // 仓库信息。
    "reviewers": [{
      "avatar": "string", // 用户头像。
      "email": "string", // 用户邮箱。
      "freeze": false, // 是否冻结。
      "is_npc": false, // 是否是 NPC。
      "nickname": "string", // 昵称。
      "username": "string" // 用户名。
    }], // 评审者列表。
    "state": "string", // Pull状态。枚举值：`open`,`closed`,`merged`
    "title": "string", // 标题。
    "updated_at": "string" // 更新时间。
  }
]
```
## 请求示例

### cURL 示例

```bash
curl -X GET \
  "${CNB_API_ENDPOINT}/{repo}/-/pull-in-batch" \
  -H "Accept: application/vnd.cnb.api+json" \
  -H "Authorization: Bearer $CNB_TOKEN" \
-G \
-d "n=<n>" \
```
