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,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(