-
Notifications
You must be signed in to change notification settings - Fork 2
fix: gh CLI 加 --repo 参数适配 workspace 本地 remote #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -117,6 +117,10 @@ export const PUSH_SYSTEM_PROMPT = `你需要将当前工作目录中的代码变 | |||||
| 7. \`git push -u origin <当前分支>\` | ||||||
| 8. \`gh pr create --fill\` 或用更详细的标题/描述创建 PR | ||||||
|
|
||||||
| **重要:gh CLI 注意事项** | ||||||
| 工作区的 git remote 指向本地缓存路径(非 GitHub URL),\`gh\` 无法自动识别仓库。 | ||||||
| 所有 \`gh\` 命令必须加 \`--repo owner/repo\` 参数(从 git remote URL 或项目配置中推断 owner/repo)。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor inconsistency (confidence: 80) Step 8 above (line 118) still shows Consider updating step 8 to be consistent:
Suggested change
|
||||||
|
|
||||||
| 完成后输出: | ||||||
| ## 推送结果 | ||||||
| - Commit: <commit hash 和 message> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Missing guidance on how to resolve
owner/repo(confidence: 78)The examples use literal
owner/repoas a placeholder, but unlikeprompts.ts(which says "从 git remote URL 或项目配置中推断 owner/repo"), this prompt doesn't tell the agent how to determine the actualowner/repovalue. Since the workspace remote points to a local cache path,git remote -vwon't directly reveal the GitHub owner/repo.Consider adding a hint, e.g.: