Loading...
Loading...
Compare original and translation side by side
package.jsonnpm testyarn testCargo.tomlcargo testpyproject.tomlsetup.pypytestgo.modgo test ./...Makefiletestmake test⊘ BLOCKED:TESTSpackage.jsonnpm testyarn testCargo.tomlcargo testpyproject.tomlsetup.pypytestgo.modgo test ./...testMakefilemake test⊘ BLOCKED:TESTSundefinedundefined
Select the candidate with the most recent merge-base (closest ancestor). If multiple branches share the same merge-base or detection is ambiguous, ask: "This branch could target `main` or `develop`. Which should it merge into?"
**Store the result** - subsequent steps reference `<base-branch>` meaning this determined value.
选择最近共同祖先(merge-base最新)的候选分支作为基准分支。如果多个分支的merge-base相同或检测结果不明确,询问用户:"This branch could target `main` or `develop`. Which should it merge into?"
**存储判定结果** - 后续步骤中的`<base-branch>`指代此处判定的基准分支。Implementation complete. What would you like to do?
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work
Which option?Implementation complete. What would you like to do?
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work
Which option?git checkout <base-branch>
git pull
git merge <feature-branch>⊘ BLOCKED:CONFLICTS
Merge conflicts in:
- <conflicted files>
Cannot auto-resolve. User must:
1. Resolve conflicts manually
2. Run tests
3. Re-run this workflowundefinedgit checkout <base-branch>
git pull
git merge <feature-branch>⊘ BLOCKED:CONFLICTS
Merge conflicts in:
- <conflicted files>
Cannot auto-resolve. User must:
1. Resolve conflicts manually
2. Run tests
3. Re-run this workflowundefined
Then: Cleanup worktree (Step 5). Report `✓ MERGED`.
然后执行:清理工作区(步骤5),输出`✓ MERGED`。ghif ! command -v gh &>/dev/null; then
echo "gh CLI not installed. Install from https://cli.github.com/ or push manually and create PR via web."
exit 1
fi
gh auth status || echo "gh not authenticated. Run: gh auth login"MERGE_BASE=$(git merge-base HEAD <base-branch>)
TITLE=$(git log --reverse --format=%s "$MERGE_BASE"..HEAD | head -1)
git push -u origin <feature-branch>
gh pr create --title "$TITLE" --body "$(cat <<'EOF'ghif ! command -v gh &>/dev/null; then
echo "gh CLI not installed. Install from https://cli.github.com/ or push manually and create PR via web."
exit 1
fi
gh auth status || echo "gh not authenticated. Run: gh auth login"MERGE_BASE=$(git merge-base HEAD <base-branch>)
TITLE=$(git log --reverse --format=%s "$MERGE_BASE"..HEAD | head -1)
git push -u origin <feature-branch>
gh pr create --title "$TITLE" --body "$(cat <<'EOF'
Report `✓ PR_CREATED` with PR URL. **Keep worktree intact** for continued work during review.
输出`✓ PR_CREATED`并附带PR链接,**保留工作区**以便评审期间继续修改。✓ PRESERVED✓ PRESERVEDThis will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>
Type 'discard' to confirm.git checkout <base-branch>
git branch -D <feature-branch>✓ DISCARDEDThis will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>
Type 'discard' to confirm.git checkout <base-branch>
git branch -D <feature-branch>✓ DISCARDEDundefinedundefined
**For Options 2 and 3:** Keep worktree intact.
**适用于选项2和选项3:** 保留工作区不变。| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | ✓ | - | - | ✓ |
| 2. Create PR | - | ✓ | ✓ | - |
| 3. Keep as-is | - | - | ✓ | - |
| 4. Discard | - | - | - | ✓ (force) |
| 选项 | 合并 | 推送 | 保留工作区 | 清理分支 |
|---|---|---|---|---|
| 1. 本地合并 | ✓ | - | - | ✓ |
| 2. 创建PR | - | ✓ | ✓ | - |
| 3. 保留现状 | - | - | ✓ | - |
| 4. 丢弃内容 | - | - | - | ✓(强制删除) |
| State | Output | Meaning |
|---|---|---|
| Branch merged to | Option 1 success |
| PR #N at URL | Option 2 success |
| Branch kept at path | Option 3 success |
| Branch deleted, worktree cleaned | Option 4 success |
| N test failures | Cannot proceed |
| Merge conflict in files | Cannot proceed |
| 状态 | 输出 | 含义 |
|---|---|---|
| Branch merged to | 选项1执行成功 |
| PR #N at URL | 选项2执行成功 |
| Branch kept at path | 选项3执行成功 |
| Branch deleted, worktree cleaned | 选项4执行成功 |
| N test failures | 流程无法继续 |
| Merge conflict in files | 流程无法继续 |
⊘ BLOCKED:TESTS⊘ BLOCKED:CONFLICTS⊘ BLOCKED:TESTS⊘ BLOCKED:CONFLICTS