Merged
fix(agent): Use "opened" PR state in code-merge-agent #5916
liuxiaoxiao11Add on Sep 3
fix(agent): Use "opened" PR state in code-merge-agent #5916
Merged
Total: 1 files changed+1-1
| @@ -144,7 +144,7 @@ curl -s "https://api.gitcode.com/api/v5/user?access_token=$TOKEN_VALUE" | |||
| 144 | 144 | ||
| 145 | 取返回的 `login` 字段作为 `current_user`。 | 145 | 取返回的 `login` 字段作为 `current_user`。 |
| 146 | 146 | ||
| 147 | -**检测已有 PR**:调用 `gitcode_list_pull_requests(owner="cann", repo="pypto")`,筛选 `state == "open"` 且 `head.ref` 匹配当前分支且 `head.user.login` 匹配 `current_user` → 得到 `existing_pr`(可能为空)。 | 147 | +**检测已有 PR**:调用 `gitcode_list_pull_requests(owner="cann", repo="pypto")`,筛选 `state == "opened"` 且 `head.ref` 匹配当前分支且 `head.user.login` 匹配 `current_user` → 得到 `existing_pr`(可能为空)。 |
| 148 | 148 | ||
| 149 | **检测已有 Issue**(两个来源,合并判断): | 149 | **检测已有 Issue**(两个来源,合并判断): |
| 150 | - 用户消息中包含 Issue 编号(`#123`、`issue 123`、`https://gitcode.com/cann/pypto/issues/123`) | 150 | - 用户消息中包含 Issue 编号(`#123`、`issue 123`、`https://gitcode.com/cann/pypto/issues/123`) |