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) run_cmd(cmd, cwd)
# Then create the PR with the aider label # Then create the PR with the aider label
pr_response = gitea_client.create_pull_request( try:
owner=repository_config.owner, pr_response = gitea_client.create_pull_request(
repo=repository_config.repo, owner=repository_config.owner,
title=issue_title, repo=repository_config.repo,
body=description, title=issue_title,
head=branch_name, body=description,
base=repository_config.base_branch, head=branch_name,
labels=['aider'], 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 # Extract PR number and URL if available
return IssueResolution( return IssueResolution(