mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
Set a status for comments on azure devops (#2011)
* Update azuredevops_provider.py * Update azuredevops_provider.py
This commit is contained in:
parent
dae9683770
commit
8258c2e774
1 changed files with 2 additions and 1 deletions
|
|
@ -57,6 +57,7 @@ class AzureDevopsProvider(GitProvider):
|
||||||
Publishes code suggestions as comments on the PR.
|
Publishes code suggestions as comments on the PR.
|
||||||
"""
|
"""
|
||||||
post_parameters_list = []
|
post_parameters_list = []
|
||||||
|
status = get_settings().azure_devops.get("default_comment_status", "closed")
|
||||||
for suggestion in code_suggestions:
|
for suggestion in code_suggestions:
|
||||||
body = suggestion['body']
|
body = suggestion['body']
|
||||||
relevant_file = suggestion['relevant_file']
|
relevant_file = suggestion['relevant_file']
|
||||||
|
|
@ -79,7 +80,7 @@ class AzureDevopsProvider(GitProvider):
|
||||||
right_file_start=CommentPosition(offset=1, line=relevant_lines_start),
|
right_file_start=CommentPosition(offset=1, line=relevant_lines_start),
|
||||||
right_file_end=CommentPosition(offset=1, line=relevant_lines_end))
|
right_file_end=CommentPosition(offset=1, line=relevant_lines_end))
|
||||||
comment = Comment(content=body, comment_type=1)
|
comment = Comment(content=body, comment_type=1)
|
||||||
thread = CommentThread(comments=[comment], thread_context=thread_context)
|
thread = CommentThread(comments=[comment], thread_context=thread_context, status=status)
|
||||||
try:
|
try:
|
||||||
self.azure_devops_client.create_thread(
|
self.azure_devops_client.create_thread(
|
||||||
comment_thread=thread,
|
comment_thread=thread,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue