diff --git a/servers/oeGitExt/src/oegitext_mcp.py b/servers/oeGitExt/src/oegitext_mcp.py index e916ec2c828c34cb5b883d99f784a577c9a7e244..1233b67069a0c0fcb4f7547fb64cb20bc07cf42c 100644 --- a/servers/oeGitExt/src/oegitext_mcp.py +++ b/servers/oeGitExt/src/oegitext_mcp.py @@ -86,8 +86,8 @@ def get_my_openeuler_pr(repo_type:str = Field(description="仓库属性,有两 @mcp.tool() def create_openeuler_pr( - repo_type: str = Field(description="仓库属性,有两种:制品仓:src-openeuler,源码仓:openeuler"), - repo_name: str = Field(description="仓库名。如果未指定,则默认和本地仓库名相同"), + target_repo_type: str = Field(description="目标仓库属性,有两种:制品仓:src-openeuler,源码仓:openeuler"), + target_repo_name: str = Field(description="目标仓库名。如果未指定,则默认和本地仓库名相同"), title: str = Field(description="PR标题"), namespace: str = Field(description="Pull Request提交使用的源命名空间(一般是git用户名)。如果未指定,则使用当前本地配置的git用户名"), source_branch: str = Field(description="Pull Request提交的源分支。如果未指定,则使用当前分支"), @@ -101,8 +101,8 @@ def create_openeuler_pr( # 构建命令 cmd = [ 'oegitext', 'pull', '-cmd', 'create', - '-user', repo_type, - '-repo', repo_name, + '-user', target_repo_type, + '-repo', target_repo_name, '-title', title, '-head', head, '-base', base @@ -116,8 +116,8 @@ def create_openeuler_pr( return { "result": result, "details": { - "source_repo": f"{namespace}/{repo_name}", - "target_repo": f"{repo_type}/{repo_name}", + "source_repo": f"{namespace}/{target_repo_name}", + "target_repo": f"{target_repo_type}/{target_repo_name}", "source_branch": source_branch, "target_branch": base }