diff --git a/.roo/rules-merge-resolver/1_workflow.xml b/.roo/rules-merge-resolver/1_workflow.xml index a63809db70e9..2f0d1162f644 100644 --- a/.roo/rules-merge-resolver/1_workflow.xml +++ b/.roo/rules-merge-resolver/1_workflow.xml @@ -30,12 +30,13 @@ gh pr checkout [PR_NUMBER] --force git fetch origin main - git rebase origin/main + GIT_EDITOR=true git rebase origin/main
Force checkout the PR branch to ensure clean state Fetch the latest main branch Attempt to rebase onto main to reveal conflicts + Use GIT_EDITOR=true to ensure non-interactive rebase
@@ -108,8 +109,8 @@ - git rebase origin/main - Rebase current branch onto main to reveal conflicts + GIT_EDITOR=true git rebase origin/main + Rebase current branch onto main to reveal conflicts (non-interactive) @@ -133,6 +134,20 @@ + + GIT_EDITOR=true git rebase --continue + Continue rebase after resolving conflicts (non-interactive) + + + + + + true + Set to 'true' (a no-op command) to prevent interactive prompts during rebase operations + Prefix git rebase commands with GIT_EDITOR=true to ensure non-interactive execution + + + All merge conflicts have been resolved Resolved files have been staged diff --git a/.roo/rules-merge-resolver/3_tool_usage.xml b/.roo/rules-merge-resolver/3_tool_usage.xml index 35f3b5da7596..30e74955744c 100644 --- a/.roo/rules-merge-resolver/3_tool_usage.xml +++ b/.roo/rules-merge-resolver/3_tool_usage.xml @@ -26,6 +26,8 @@ Chain git commands with && for efficiency Use --format options for structured output Capture command output for parsing + Use GIT_EDITOR=true for non-interactive git rebase operations + Set environment variables inline to avoid prompts during automation @@ -46,7 +48,7 @@ Rebase onto main to reveal conflicts - git rebase origin/main + GIT_EDITOR=true git rebase origin/main @@ -71,7 +73,7 @@ Continue rebase after resolution - git rebase --continue + GIT_EDITOR=true git rebase --continue @@ -152,7 +154,7 @@ const config = { execute_command - Get PR info with gh CLI execute_command - Checkout PR with gh pr checkout --force execute_command - Fetch origin main - execute_command - Rebase onto origin/main + execute_command - Rebase onto origin/main with GIT_EDITOR=true execute_command - Check for conflicts with git status @@ -178,13 +180,22 @@ const config = { execute_command - Check all conflicts resolved - execute_command - Continue rebase with git rebase --continue + execute_command - Continue rebase with GIT_EDITOR=true git rebase --continue execute_command - Verify clean status + + Git commands waiting for interactive input + + Use GIT_EDITOR=true to bypass editor prompts + Set GIT_SEQUENCE_EDITOR=true for sequence editing + Consider --no-edit flag for commit operations + + + Rebase completes without conflicts @@ -225,4 +236,42 @@ const config = { + + + + Ensuring git operations run without requiring user interaction is critical + for automated conflict resolution. The mode uses environment variables to + bypass interactive prompts. + + + + + Set to 'true' (a no-op command) to skip editor prompts + GIT_EDITOR=true git rebase --continue + During rebase operations that would normally open an editor + + + + Skip interactive rebase todo editing + GIT_SEQUENCE_EDITOR=true git rebase -i HEAD~3 + When interactive rebase is triggered but no editing needed + + + + Use flags to avoid interactive prompts + + git commit --no-edit (use existing message) + git merge --no-edit (skip merge message editing) + git cherry-pick --no-edit (keep original message) + + + + + + Always test commands locally first to identify potential prompts + Combine environment variables when multiple editors might be invoked + Document why non-interactive mode is used in comments + Have fallback strategies if automation fails + + \ No newline at end of file diff --git a/.roo/rules-merge-resolver/4_complete_example.xml b/.roo/rules-merge-resolver/4_complete_example.xml index dae858799717..32b2bf344bc8 100644 --- a/.roo/rules-merge-resolver/4_complete_example.xml +++ b/.roo/rules-merge-resolver/4_complete_example.xml @@ -54,7 +54,7 @@ From github.com:user/repo -git rebase origin/main +GIT_EDITOR=true git rebase origin/main ]]> -git rebase --continue +GIT_EDITOR=true git rebase --continue ]]> Use git blame and commit messages to understand the history Combine non-conflicting improvements when possible Prioritize bugfixes while accommodating refactors - Complete the rebase process with git rebase --continue + Use GIT_EDITOR=true to ensure non-interactive rebase operations + Complete the rebase process with GIT_EDITOR=true git rebase --continue Validate that both sets of changes work together \ No newline at end of file