refactor: push changes and create PR after every iteration in solve_issue_in_repository
This commit is contained in:
parent
890dada71c
commit
948ab5a382
|
@ -455,19 +455,7 @@ def solve_issue_in_repository(
|
||||||
)
|
)
|
||||||
return IssueResolution(False)
|
return IssueResolution(False)
|
||||||
|
|
||||||
# Verify whether this is a satisfactory solution
|
# Push changes and create/update the pull request on every iteration
|
||||||
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
|
|
||||||
resolution = push_changes(
|
resolution = push_changes(
|
||||||
repository_config,
|
repository_config,
|
||||||
repository_path,
|
repository_path,
|
||||||
|
@ -479,6 +467,10 @@ def solve_issue_in_repository(
|
||||||
if not resolution.success:
|
if not resolution.success:
|
||||||
return resolution
|
return resolution
|
||||||
|
|
||||||
|
# Verify whether this is a satisfactory solution
|
||||||
|
if verify_solution(repository_path, issue_content):
|
||||||
|
return resolution
|
||||||
|
|
||||||
|
|
||||||
def solve_issues_in_repository(
|
def solve_issues_in_repository(
|
||||||
repository_config: RepositoryConfig,
|
repository_config: RepositoryConfig,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user