From 948ab5a3826dc827c554bb119172eabf07b8c67e Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Mon, 21 Apr 2025 12:50:05 +0200 Subject: [PATCH] refactor: push changes and create PR after every iteration in solve_issue_in_repository --- aider_gitea/__init__.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index 9b6e2c4..8f1b69f 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -455,19 +455,7 @@ def solve_issue_in_repository( ) return IssueResolution(False) - # Verify whether this is a satisfactory solution - if verify_solution(repository_path, issue_content): - # 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 + # Push changes and create/update the pull request on every iteration resolution = push_changes( repository_config, repository_path, @@ -479,6 +467,10 @@ def solve_issue_in_repository( if not resolution.success: return resolution + # Verify whether this is a satisfactory solution + if verify_solution(repository_path, issue_content): + return resolution + def solve_issues_in_repository( repository_config: RepositoryConfig,