Removed useless functionality
This commit is contained in:
parent
b9013b7b2a
commit
54cddfde0b
|
@ -506,21 +506,21 @@ def solve_issues_in_repository(
|
||||||
title = issue.get('title', f'Issue {issue_number}')
|
title = issue.get('title', f'Issue {issue_number}')
|
||||||
if seen_issues_db.has_seen(issue_url):
|
if seen_issues_db.has_seen(issue_url):
|
||||||
logger.info('Skipping already processed issue #%s: %s', issue_number, title)
|
logger.info('Skipping already processed issue #%s: %s', issue_number, title)
|
||||||
continue
|
else:
|
||||||
|
branch_name = generate_branch_name(issue_number, title)
|
||||||
|
with tempfile.TemporaryDirectory() as repository_path:
|
||||||
|
issue_resolution = solve_issue_in_repository(
|
||||||
|
repository_config,
|
||||||
|
Path(repository_path),
|
||||||
|
branch_name,
|
||||||
|
title,
|
||||||
|
issue_description,
|
||||||
|
issue_number,
|
||||||
|
client,
|
||||||
|
)
|
||||||
|
|
||||||
branch_name = generate_branch_name(issue_number, title)
|
# TODO: PR comment handling disabled for now due to missing functionality
|
||||||
with tempfile.TemporaryDirectory() as repository_path:
|
if False:
|
||||||
issue_resolution = solve_issue_in_repository(
|
|
||||||
repository_config,
|
|
||||||
Path(repository_path),
|
|
||||||
branch_name,
|
|
||||||
title,
|
|
||||||
issue_description,
|
|
||||||
issue_number,
|
|
||||||
client,
|
|
||||||
)
|
|
||||||
|
|
||||||
if issue_resolution.success:
|
|
||||||
# Handle unresolved pull request comments
|
# Handle unresolved pull request comments
|
||||||
handle_pr_comments(
|
handle_pr_comments(
|
||||||
repository_config,
|
repository_config,
|
||||||
|
|
|
@ -183,21 +183,6 @@ class GiteaClient:
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
def get_pull_request_comments(
|
|
||||||
self,
|
|
||||||
owner: str,
|
|
||||||
repo: str,
|
|
||||||
pr_number: int,
|
|
||||||
) -> list[dict]:
|
|
||||||
"""
|
|
||||||
Fetch comments for a pull request.
|
|
||||||
"""
|
|
||||||
assert isinstance(pr_number, int)
|
|
||||||
url = f'{self.gitea_url}/repos/{owner}/{repo}/pulls/{pr_number}/comments'
|
|
||||||
response = self.session.get(url)
|
|
||||||
response.raise_for_status()
|
|
||||||
return response.json()
|
|
||||||
|
|
||||||
def get_pull_requests(
|
def get_pull_requests(
|
||||||
self,
|
self,
|
||||||
owner: str,
|
owner: str,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user