mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-22 11:25:13 +00:00
Remove git commands from Ralph loop recipes
Git operations (commit, push) belong in the prompt instructions, not hardcoded in the loop orchestrator. The SDK recipes should focus purely on the SDK API: create client, create session, send prompt, destroy.
This commit is contained in:
@@ -110,9 +110,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
copilot "github.com/github/copilot-sdk/go"
|
||||
)
|
||||
@@ -129,13 +127,9 @@ func ralphLoop(ctx context.Context, mode string, maxIterations int) error {
|
||||
}
|
||||
defer client.Stop()
|
||||
|
||||
branchOut, _ := exec.Command("git", "branch", "--show-current").Output()
|
||||
branch := strings.TrimSpace(string(branchOut))
|
||||
|
||||
fmt.Println(strings.Repeat("━", 40))
|
||||
fmt.Printf("Mode: %s\n", mode)
|
||||
fmt.Printf("Prompt: %s\n", promptFile)
|
||||
fmt.Printf("Branch: %s\n", branch)
|
||||
fmt.Printf("Max: %d iterations\n", maxIterations)
|
||||
fmt.Println(strings.Repeat("━", 40))
|
||||
|
||||
@@ -163,11 +157,6 @@ func ralphLoop(ctx context.Context, mode string, maxIterations int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Push changes after each iteration
|
||||
if err := exec.Command("git", "push", "origin", branch).Run(); err != nil {
|
||||
exec.Command("git", "push", "-u", "origin", branch).Run()
|
||||
}
|
||||
|
||||
fmt.Printf("\nIteration %d complete.\n", i)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user