Compare commits

...

1 Commits

Author SHA1 Message Date
ccb70d3d47 fix: add try-except around pull request creation to catch errors
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 24s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s
2025-04-23 09:00:41 +02:00

View File

@ -270,6 +270,7 @@ 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
try:
pr_response = gitea_client.create_pull_request( pr_response = gitea_client.create_pull_request(
owner=repository_config.owner, owner=repository_config.owner,
repo=repository_config.repo, repo=repository_config.repo,
@ -279,6 +280,9 @@ def push_changes(
base=repository_config.base_branch, base=repository_config.base_branch,
labels=['aider'], 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(