Try-catch around core pull request logic #98

Closed
Jmaa wants to merge 1 commits from issue-95-trycatch-around-core-pull-request-logic into main

View File

@ -270,15 +270,19 @@ def push_changes(
run_cmd(cmd, cwd)
# Then create the PR with the aider label
pr_response = gitea_client.create_pull_request(
owner=repository_config.owner,
repo=repository_config.repo,
title=issue_title,
body=description,
head=branch_name,
base=repository_config.base_branch,
labels=['aider'],
)
try:
pr_response = gitea_client.create_pull_request(
owner=repository_config.owner,
repo=repository_config.repo,
title=issue_title,
body=description,
head=branch_name,
base=repository_config.base_branch,
labels=['aider'],
)
except Exception:
logger.exception('Failed to create pull request for issue %s', issue_number)
return IssueResolution(False)
# Extract PR number and URL if available
return IssueResolution(