From 3458826f54df95167c18735319e99f2f2c7afabf Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Mon, 21 Apr 2025 12:43:03 +0200 Subject: [PATCH] refactor: push changes and create pull request after each iteration in solve_issue_in_repository --- aider_gitea/__init__.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index 2c47059..9fe004d 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -457,17 +457,28 @@ def solve_issue_in_repository( # Verify whether this is a satisfactory solution if verify_solution(repository_path, issue_content): - break + # Push final changes and create pull request + return push_changes( + repository_config, + repository_path, + branch_name, + issue_number, + issue_title, + gitea_client, + ) + + # Push intermediate changes and create/update the pull request + resolution = push_changes( + repository_config, + repository_path, + branch_name, + issue_number, + issue_title, + gitea_client, + ) + if not resolution.success: + return resolution - # Push changes - return push_changes( - repository_config, - repository_path, - branch_name, - issue_number, - issue_title, - gitea_client, - ) def solve_issues_in_repository(