fix: add try-except around pull request creation to catch errors
This commit is contained in:
parent
e56463d207
commit
ccb70d3d47
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user