Handle pull request comments only after having handled all unresollved issues. #104
|
@ -517,16 +517,6 @@ def solve_issues_in_repository(
|
|||
)
|
||||
|
||||
if issue_resolution.success:
|
||||
# Handle unresolved pull request comments
|
||||
handle_pr_comments(
|
||||
repository_config,
|
||||
issue_resolution.pull_request_id,
|
||||
branch_name,
|
||||
Path(repository_path),
|
||||
client,
|
||||
seen_issues_db,
|
||||
issue_url,
|
||||
)
|
||||
seen_issues_db.mark_as_seen(issue_url, str(issue_number))
|
||||
seen_issues_db.update_pr_info(
|
||||
issue_url,
|
||||
|
@ -538,6 +528,16 @@ def solve_issues_in_repository(
|
|||
issue_resolution.pull_request_id,
|
||||
issue_number,
|
||||
)
|
||||
# Handle unresolved pull request comments
|
||||
handle_pr_comments(
|
||||
repository_config,
|
||||
issue_resolution.pull_request_id,
|
||||
branch_name,
|
||||
Path(repository_path),
|
||||
client,
|
||||
seen_issues_db,
|
||||
issue_url,
|
||||
)
|
||||
|
||||
|
||||
def handle_pr_comments(
|
||||
|
|
|
@ -169,7 +169,9 @@ class GiteaClient:
|
|||
# If a pull request for this head/base already exists, return it instead of crashing
|
||||
if response.status_code == 422:
|
||||
logger.warning(
|
||||
'Pull request already exists for head %s and base %s', head, base,
|
||||
'Pull request already exists for head %s and base %s',
|
||||
head,
|
||||
base,
|
||||
)
|
||||
prs = self.get_pull_requests(owner, repo)
|
||||
for pr in prs:
|
||||
|
|
Loading…
Reference in New Issue
Block a user