Repository navigation
chore(AIAgent): update bb-pr to create a new PR - #1400
Conversation
Reviewer's GuideDocumentation更新 bb-pr skill 文档,明确每次创建新 PR、已有未关闭 PR 时停止,并调整创建前检查与核验流程。
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit f070e18 #1361 doc(Agents): simplify GitHub Issue/PR skill workflow · 0 of 5 met
|
There was a problem hiding this comment.
Hey - I've found 8 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".agents/skills/bb-pr/SKILL.md" line_range="12" />
<code_context>
-3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/) 和 [PR 模板](../../../.github/pull_request_template.md),参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
-4. 仅在步骤 2 未找到未关闭的 PR 时创建新的 PR;不要复用或更新已关闭的 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。分支名可能包含 `/`,始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`;跨仓库 Issue 使用 `fixes <owner>/<repo>#<编号>`。按实际改动和已知验证结果填写正文,不勾选未完成的项目。
-5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
</code_context>
<issue_to_address>
**PR omits local changes**
When uncommitted changes include work intended for the PR, the skill only reports the uncommitted files, then creates a PR from the pushed branch. Those local changes are absent, so the user gets an incomplete PR.
Stop when uncommitted changes affect the intended PR, and require them to be committed and pushed before proceeding.
Also at `.agents/skills/bb-pr/SKILL.md:13`.
</issue_to_address>
### Comment 2
<location path=".agents/skills/bb-pr/SKILL.md" line_range="15" />
<code_context>
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
+4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。
+5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端,确认未创建后才能重试;状态无法确认时如实报告。
</code_context>
<issue_to_address>
**Wrong Issue gets linked**
When the Issue being linked belongs to a repository other than the PR target, the PR body uses `fixes #<number>`, which GitHub resolves in the PR's repository. The intended Issue remains unlinked and open, and a same-numbered Issue in the PR repository can be closed instead.
Use a repository-qualified Issue reference for Issues outside the PR's repository.
Also at `.agents/skills/bb-pr/SKILL.md:16`.
</issue_to_address>
### Comment 3
<location path=".agents/skills/bb-pr/SKILL.md" line_range="12" />
<code_context>
-3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/) 和 [PR 模板](../../../.github/pull_request_template.md),参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
-4. 仅在步骤 2 未找到未关闭的 PR 时创建新的 PR;不要复用或更新已关闭的 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。分支名可能包含 `/`,始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`;跨仓库 Issue 使用 `fixes <owner>/<repo>#<编号>`。按实际改动和已知验证结果填写正文,不勾选未完成的项目。
-5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
</code_context>
<issue_to_address>
**PR creation uses an unrelated head**
When the current branch tracks a remote outside the target repository's fork network, the workflow passes that remote branch as the head to `gh pr create`. GitHub cannot create the intended PR from that source, so creation fails or uses an unintended head.
Verify that the upstream is the target repository or one of its forks before using it as the PR head.
Also at `.agents/skills/bb-pr/SKILL.md:15`.
</issue_to_address>
### Comment 4
<location path=".agents/skills/bb-pr/SKILL.md" line_range="14" />
<code_context>
-5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
+4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。
+5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端,确认未创建后才能重试;状态无法确认时如实报告。
</code_context>
<issue_to_address>
**New Issue is left unlinked**
When a matching open PR exists and no matching Issue exists, step 3 creates an Issue before step 4 checks for an open PR. Step 4 then stops, leaving the new Issue without a PR linking it.
Check for an existing open PR before creating an Issue, and stop without creating one when that PR has no matching Issue.
Also at `.agents/skills/bb-pr/SKILL.md:15-16`.
</issue_to_address>
### Comment 5
<location path=".agents/skills/bb-pr/SKILL.md" line_range="14" />
<code_context>
-5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
+4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。
+5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端,确认未创建后才能重试;状态无法确认时如实报告。
</code_context>
<issue_to_address>
**Matching Issues get duplicated**
When a matching Issue already exists for the changes, step 3 allows creating an Issue without first requiring the agent to find and reuse a match. The agent creates a duplicate and can link the PR to the wrong Issue.
Require searching for and reusing a matching Issue before creating a new one.
Also at `.agents/skills/bb-pr/SKILL.md:15`.
</issue_to_address>
### Comment 6
<location path=".agents/skills/bb-pr/SKILL.md" line_range="15" />
<code_context>
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
+4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。
+5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端,确认未创建后才能重试;状态无法确认时如实报告。
</code_context>
<issue_to_address>
**PR reuse instructions conflict**
When a caller follows `bb-update` and a matching open PR already exists, `bb-update` and the repository guidance allow reusing or updating a PR, but `bb-pr` says to stop when that PR exists. The caller gets conflicting instructions and the delivery flow does not return the expected PR link.
Align `bb-pr` and the repository guidance with `bb-update` on whether to reuse, update, or stop for an existing PR.
Also at `.agents/skills/bb-pr/SKILL.md:10`.
</issue_to_address>
### Comment 7
<location path=".agents/skills/bb-pr/SKILL.md" line_range="14" />
<code_context>
-5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。
+1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。
+2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。
+3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。
+4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。
+5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端,确认未创建后才能重试;状态无法确认时如实报告。
</code_context>
<issue_to_address>
**模板目录引用不存在**
步骤 3 要求读取 `.github/PULL_REQUEST_TEMPLATE/`,但仓库没有该路径;按步骤检查时会遇到不存在的目录,无法完成这项要求。
删除不存在目录的引用,或先创建该目录并添加适用模板。
</issue_to_address>
### Comment 8
<location path=".agents/skills/bb-pr/SKILL.md" line_range="1" />
<code_context>
---
name: bb-pr
-description: 根据当前分支的已推送改动复用或创建 GitHub Issue,并复用已有或创建关联 PR。
</code_context>
<issue_to_address>
**Wrong skill updated**
The issue asks to simplify `.agents/skills/github-issue-pr/SKILL.md`, but this change updates `.agents/skills/bb-pr/SKILL.md` instead. The requested skill and its workflow requirements remain unchanged.
</issue_to_address>| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/) 和 [PR 模板](../../../.github/pull_request_template.md),参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 | ||
| 4. 仅在步骤 2 未找到未关闭的 PR 时创建新的 PR;不要复用或更新已关闭的 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。分支名可能包含 `/`,始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`;跨仓库 Issue 使用 `fixes <owner>/<repo>#<编号>`。按实际改动和已知验证结果填写正文,不勾选未完成的项目。 | ||
| 5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。 | ||
| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 |
There was a problem hiding this comment.
🟡 Medium · PR omits local changes
When uncommitted changes include work intended for the PR, the skill only reports the uncommitted files, then creates a PR from the pushed branch. Those local changes are absent, so the user gets an incomplete PR.
Stop when uncommitted changes affect the intended PR, and require them to be committed and pushed before proceeding.
Also at .agents/skills/bb-pr/SKILL.md:13.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 12:
**PR omits local changes**
When uncommitted changes include work intended for the PR, the skill only reports the uncommitted files, then creates a PR from the pushed branch. Those local changes are absent, so the user gets an incomplete PR.
Stop when uncommitted changes affect the intended PR, and require them to be committed and pushed before proceeding.
Also at `.agents/skills/bb-pr/SKILL.md:13`.| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 | ||
| 2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。 | ||
| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 | ||
| 4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。 |
There was a problem hiding this comment.
🟡 Medium · Wrong Issue gets linked
When the Issue being linked belongs to a repository other than the PR target, the PR body uses fixes #<number>, which GitHub resolves in the PR's repository. The intended Issue remains unlinked and open, and a same-numbered Issue in the PR repository can be closed instead.
Use a repository-qualified Issue reference for Issues outside the PR's repository.
Also at .agents/skills/bb-pr/SKILL.md:16.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 15:
**Wrong Issue gets linked**
When the Issue being linked belongs to a repository other than the PR target, the PR body uses `fixes #<number>`, which GitHub resolves in the PR's repository. The intended Issue remains unlinked and open, and a same-numbered Issue in the PR repository can be closed instead.
Use a repository-qualified Issue reference for Issues outside the PR's repository.
Also at `.agents/skills/bb-pr/SKILL.md:16`.| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/) 和 [PR 模板](../../../.github/pull_request_template.md),参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 | ||
| 4. 仅在步骤 2 未找到未关闭的 PR 时创建新的 PR;不要复用或更新已关闭的 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。分支名可能包含 `/`,始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`;跨仓库 Issue 使用 `fixes <owner>/<repo>#<编号>`。按实际改动和已知验证结果填写正文,不勾选未完成的项目。 | ||
| 5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。 | ||
| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 |
There was a problem hiding this comment.
🟡 Medium · PR creation uses an unrelated head
When the current branch tracks a remote outside the target repository's fork network, the workflow passes that remote branch as the head to gh pr create. GitHub cannot create the intended PR from that source, so creation fails or uses an unintended head.
Verify that the upstream is the target repository or one of its forks before using it as the PR head.
Also at .agents/skills/bb-pr/SKILL.md:15.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 12:
**PR creation uses an unrelated head**
When the current branch tracks a remote outside the target repository's fork network, the workflow passes that remote branch as the head to `gh pr create`. GitHub cannot create the intended PR from that source, so creation fails or uses an unintended head.
Verify that the upstream is the target repository or one of its forks before using it as the PR head.
Also at `.agents/skills/bb-pr/SKILL.md:15`.| 5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。 | ||
| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 | ||
| 2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。 | ||
| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 |
There was a problem hiding this comment.
🟡 Medium · New Issue is left unlinked
When a matching open PR exists and no matching Issue exists, step 3 creates an Issue before step 4 checks for an open PR. Step 4 then stops, leaving the new Issue without a PR linking it.
Check for an existing open PR before creating an Issue, and stop without creating one when that PR has no matching Issue.
Also at .agents/skills/bb-pr/SKILL.md:15-16.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 14:
**New Issue is left unlinked**
When a matching open PR exists and no matching Issue exists, step 3 creates an Issue before step 4 checks for an open PR. Step 4 then stops, leaving the new Issue without a PR linking it.
Check for an existing open PR before creating an Issue, and stop without creating one when that PR has no matching Issue.
Also at `.agents/skills/bb-pr/SKILL.md:15-16`.| 5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。 | ||
| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 | ||
| 2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。 | ||
| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 |
There was a problem hiding this comment.
🟡 Medium · Matching Issues get duplicated
When a matching Issue already exists for the changes, step 3 allows creating an Issue without first requiring the agent to find and reuse a match. The agent creates a duplicate and can link the PR to the wrong Issue.
Require searching for and reusing a matching Issue before creating a new one.
Also at .agents/skills/bb-pr/SKILL.md:15.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 14:
**Matching Issues get duplicated**
When a matching Issue already exists for the changes, step 3 allows creating an Issue without first requiring the agent to find and reuse a match. The agent creates a duplicate and can link the PR to the wrong Issue.
Require searching for and reusing a matching Issue before creating a new one.
Also at `.agents/skills/bb-pr/SKILL.md:15`.| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 | ||
| 2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。 | ||
| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 | ||
| 4. 每次都创建新的 PR,不复用或更新已有 PR。只检查同一 head 和 base 是否已有未关闭的 PR;若有则停止并提示无需新建 PR。使用 `gh pr create --repo <目标仓库>`,以当前远端分支为 head、默认分支为 base。始终将完整分支名作为一个值传递;Fork 的 head 格式为 `<owner>:<完整分支名>`,冒号用于分隔仓库所有者与分支名,不要按斜杠拆分分支名。保留 PR 模板的标题、注释、清单和顺序,在 `Link issues` 中填写 `fixes #<编号>`。 |
There was a problem hiding this comment.
🟡 Medium · PR reuse instructions conflict
When a caller follows bb-update and a matching open PR already exists, bb-update and the repository guidance allow reusing or updating a PR, but bb-pr says to stop when that PR exists. The caller gets conflicting instructions and the delivery flow does not return the expected PR link.
Align bb-pr and the repository guidance with bb-update on whether to reuse, update, or stop for an existing PR.
Also at .agents/skills/bb-pr/SKILL.md:10.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 15:
**PR reuse instructions conflict**
When a caller follows `bb-update` and a matching open PR already exists, `bb-update` and the repository guidance allow reusing or updating a PR, but `bb-pr` says to stop when that PR exists. The caller gets conflicting instructions and the delivery flow does not return the expected PR link.
Align `bb-pr` and the repository guidance with `bb-update` on whether to reuse, update, or stop for an existing PR.
Also at `.agents/skills/bb-pr/SKILL.md:10`.| 5. 回读 Issue 和 PR,确认链接、head、base 和 Issue 关联并返回链接。创建请求报错时先查询远端;若发现同一 head 和 base 的未关闭 PR,则复用并返回;确认未创建且仍无匹配 PR 后才能重试。状态无法确认时如实报告。 | ||
| 1. 确认目标仓库及其默认分支,当前分支必须是非默认分支;远端分支必须与本地 `HEAD` 一致。存在未提交的改动时提示有未提交文件。 | ||
| 2. 只读核对当前分支相对默认分支的差异,确认有改动可发布。 | ||
| 3. 读取 [Issue 表单](../../../.github/ISSUE_TEMPLATE/)、[PR 模板](../../../.github/pull_request_template.md)及 `.github/PULL_REQUEST_TEMPLATE/` 中的适用模板,参考近期同类 Issue 和 PR 的惯例。需要新建 Issue 时,根据实际差异创建,使用 `gh issue create --repo <目标仓库>`。 |
There was a problem hiding this comment.
⚪ Low · 模板目录引用不存在
步骤 3 要求读取 .github/PULL_REQUEST_TEMPLATE/,但仓库没有该路径;按步骤检查时会遇到不存在的目录,无法完成这项要求。
删除不存在目录的引用,或先创建该目录并添加适用模板。
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 14:
**模板目录引用不存在**
步骤 3 要求读取 `.github/PULL_REQUEST_TEMPLATE/`,但仓库没有该路径;按步骤检查时会遇到不存在的目录,无法完成这项要求。
删除不存在目录的引用,或先创建该目录并添加适用模板。| @@ -1,16 +1,16 @@ | |||
| --- | |||
There was a problem hiding this comment.
🔴 Critical · Wrong skill updated
The issue asks to simplify .agents/skills/github-issue-pr/SKILL.md, but this change updates .agents/skills/bb-pr/SKILL.md instead. The requested skill and its workflow requirements remain unchanged.
Prompt for AI agents
In `.agents/skills/bb-pr/SKILL.md` at line 1:
**Wrong skill updated**
The issue asks to simplify `.agents/skills/github-issue-pr/SKILL.md`, but this change updates `.agents/skills/bb-pr/SKILL.md` instead. The requested skill and its workflow requirements remain unchanged.From #1361:
Simplify `.agents/skills/github-issue-pr/SKILL.md`.
Link issues
fixes #1361
Summary By Copilot
更新
.agents/skills/bb-pr/SKILL.md:明确该 skill 每次都创建新的 PR,不再复用已有 PR;保留 Issue 创建与远端状态核验流程,并收紧分支、差异和创建前检查说明。Regression?
Risk
仅调整仓库内部 Agent skill 文档,不涉及运行时代码、组件或依赖。
Verification
本次未运行构建或测试;按
/bb-prskill 限制仅执行只读核对和 GitHub Issue/PR 操作。Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Require the bb-pr skill to create a new PR for each run while preserving its linked Issue workflow.
Enhancements: