Skip to content

Commit 7026fd9

Browse files
committed
fix: use origin/main in extract and complete phases — local main ref may be stale
1 parent 139a614 commit 7026fd9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

agents/orchestrations/fix_and_review/phases/complete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def run_complete(
3939
for repo in affected_repos:
4040
repo_name = repo.split("/")[-1] if "/" in repo else repo
4141
stdout, _, exit_code = client.run_command(
42-
session_id, f"cd {repo_name} && git log main..{branch_name} --oneline 2>/dev/null"
42+
session_id, f"cd {repo_name} && git log origin/main..{branch_name} --oneline 2>/dev/null"
4343
)
4444
if exit_code == 0 and stdout.strip():
4545
full_repo = full_repo_map.get(repo, repo)

agents/orchestrations/fix_and_review/phases/extract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def run_extract(
3232
for repo_name in [cli_name, cdk_name]:
3333
# Check if this repo has changes on the branch
3434
commit_log, _, exit_code = client.run_command(
35-
session_id, f"cd {repo_name} && git log main..HEAD --oneline 2>/dev/null"
35+
session_id, f"cd {repo_name} && git log origin/main..HEAD --oneline 2>/dev/null"
3636
)
3737
if exit_code != 0 or not commit_log.strip():
3838
continue
3939

40-
diff_stat, _, _ = client.run_command(session_id, f"cd {repo_name} && git diff main --stat")
41-
full_diff, _, _ = client.run_command(session_id, f"cd {repo_name} && git diff main")
40+
diff_stat, _, _ = client.run_command(session_id, f"cd {repo_name} && git diff origin/main --stat")
41+
full_diff, _, _ = client.run_command(session_id, f"cd {repo_name} && git diff origin/main")
4242

4343
all_diff_stat += diff_stat
4444
all_full_diff += full_diff

0 commit comments

Comments
 (0)