# 项目提交设置

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

# 新增项目提交设置

POST /api/v3/svn/projects/:id/commit_settings

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
path string 目录路径 如:/tags
forbid_submit boolean(可选) 禁止提交代码。默认false

返回值:

{
    "id": 2764,
    "projectId": 11242475,
    "userId": 01,
    "path": "/tags",
    "forbidSubmit": false,
    "bindTapd": false,
    "msgNeed": false,
    "reviewNeed": false,
    "isDir": true,
    "createdAt": "2023-04-20T08:28:41+0000",
    "updatedAt": "2023-04-20T08:28:41+0000"
}

# 编辑项目提交设置

PUT /api/v3/svn/projects/:id/commit_settings/:commit_settings_id

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
commit_settings_id integer 提交设置的 id
forbid_submit boolean(可选) 禁止提交代码。默认false

返回值:

{
    "id": 2764,
    "projectId": 11242475,
    "path": "/tags",
    "forbidSubmit": true,
    "bindTapd": true,
    "msgNeed": false,
    "reviewNeed": true,
    "createdAt": 1681979322000,
    "user": {
        "id": 01,
        "username": "git_user",
        "web_url": "https://git.tencent.com/u/git_user",
        "name": "git_user",
        "state": "active",
        "avatar_url": "https://git.tencent.com/uploads/user/avatar/01/thumb_1-0-248-249_dd5f4d168038460394c965d862675754.jpg"
    }
}

# 查询项目提交设置列表

GET /api/v3/svn/projects/:id/commit_settings

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
path string(可选) 可通过目录路径搜索

返回值:

[
    {
        "id": 2762,
        "projectId": 11242475,
        "path": "/branches",
        "forbidSubmit": false,
        "bindTapd": false,
        "msgNeed": true,
        "reviewNeed": false,
        "createdAt": 1681801487000,
        "user": {
            "id": 01,
            "username": "git_user",
            "web_url": "https://git.tencent.com/u/git_user",
            "name": "git_user",
            "state": "active",
            "avatar_url": "https://git.tencent.com/uploads/user/avatar/01/thumb_1-0-248-249_dd5f4d168038460394c965d862675754.jpg"
        }
    }

]

# 查询项目单个提交设置

GET /api/v3/svn/projects/:id/commit_settings/:commit_settings_id

参数:

参数 类型 描述
id integer 或 string 项目 ID 或 项目全路径 project_full_path
commit_settings_id integer 提交设置的 id

返回值:

{
    "id": 2764,
    "projectId": 11242475,
    "path": "/tags",
    "forbidSubmit": true,
    "bindTapd": true,
    "msgNeed": false,
    "reviewNeed": true,
    "createdAt": 1681979322000,
    "user": {
        "id": 01,
        "username": "git_user",
        "web_url": "https://git.tencent.com/u/git_user",
        "name": "git_user",
        "state": "active",
        "avatar_url": "https://git.tencent.com/uploads/user/avatar/01/thumb_1-0-248-249_dd5f4d168038460394c965d862675754.jpg"
    }
}
lastUpdate: 7/3/2023, 5:56:14 PM