create_change_request
[Code Management] Create a new change request (merge request). Supports specifying source/target branches, reviewers, associated work items, and optional AI review trigger.
Instructions
[Code Management] Create a new change request (merge request). Supports specifying source/target branches, reviewers, associated work items, and optional AI review trigger.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"organizationId": "<organizationId>",
"repositoryId": "<repositoryId>",
"title": "<title>",
"sourceBranch": "<sourceBranch>",
"targetBranch": "<targetBranch>"
},
"name": "create_change_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | 标题,不超过256个字符。示例:'mr title' 或 '修复登录bug' | |
| createFrom | No | 创建来源。WEB - 页面创建(默认) | WEB |
| description | No | 描述,不超过10000个字符。示例:'mr description' 或 '修复了用户登录时的验证逻辑问题' | |
| workItemIds | No | 关联工作项ID列表,以字符串形式逗号分隔。示例值:722200214032b6b31e6f1434ab,xxx | |
| repositoryId | Yes | 代码库ID或全路径(斜杠须编码为%2F),如 2835387 或 myorg%2FmyRepo | |
| sourceBranch | Yes | 源分支名称,即要合并的分支。示例:'demo-branch' 或 'feature/user-login' | |
| targetBranch | Yes | 目标分支名称,即合并到的分支。示例:'master' 或 'main' | |
| organizationId | Yes | 组织ID | |
| extensionParams | No | 扩展参数,值必须为字符串。aiReview.model 用于指定 AI 评审模型,值为 JSON 字符串,例如 {"modelKey":"glm-5.2"} | |
| reviewerUserIds | No | 评审人用户ID列表。示例:['62c795xxxb468af8'] 或 ['62c795xxxb468af8', '62c795xxxb468af9'] | |
| sourceProjectId | No | 源库ID,如果未提供,将尝试自动获取。示例:2813489 | |
| targetProjectId | No | 目标库ID,如果未提供,将尝试自动获取。示例:2813489 | |
| triggerAIReviewRun | No | 是否触发AI评审。true - 触发AI评审;false - 不触发(默认) |