# OWNERS

如果使用 project_full_path,确保 project_full_path 编码过,例子:/api/v3/projects/tencent/code--> /api/v3/projects/tencent%2Fcode (/ 编码 %2F)

# 获取 OWNERS 配置

获取项目的 OWNERS 配置数据

POST /api/v3/projects/:id/owners

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
file_paths array of string 查询 owner 的文件 list
限制数量大小为 100
min_access_level integer(可选) 过滤私有项目的最小权限,默认不过滤
有效值可以参考 权限说明

返回值:

[
    {
        "file_path": "test.js",
        "configs": [
            {
                "owners": [
                    {
                        "id": 11323,
                        "username": "owners_01",
                        "web_url": "https://git.tencent.com/u/owners_01",
                        "name": "owners_01",
                        "state": "active",
                        "avatar_url": "https://git.tencent.com/assets/images/avatar/no_user_avatar.png"
                    }
                ],
                "config_path": "./OWNERS"
            }
        ]
    }
]

# 获取 OWNERS 配置文件列表

当项目开启 OWNERS 配置,可获取项目默认分支 的 OWNERS 配置文件列表。

GET /api/v3/projects/:id/owners/config_list

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
page integer(可选) 页数 (默认值:1)
per_page integer(可选) 默认页面大小 (默认值 500,最大值:500)

返回值:

[
    "OWNERS",
    "test/OWNERS"
]
lastUpdate: 8/2/2024, 5:28:21 PM