mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
feat: Update inline comment creation in git providers and improve code suggestion handling
- Update `create_inline_comment` method in various git providers to include `absolute_position` parameter - Remove `create_inline_comment` method from providers that do not support inline comments - Enhance `find_line_number_of_relevant_line_in_file` function to handle absolute position - Modify `pr_code_suggestions.py` to handle improved code inclusion in suggestions - Add `include_improved_code` configuration option in `configuration.toml` and update documentation accordingly
This commit is contained in:
@ -26,6 +26,7 @@ Under the section 'pr_code_suggestions', the [configuration file](./../pr_agent/
|
|||||||
- `num_code_suggestions`: number of code suggestions provided by the 'improve' tool. Default is 4.
|
- `num_code_suggestions`: number of code suggestions provided by the 'improve' tool. Default is 4.
|
||||||
- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
|
- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
|
||||||
- `rank_suggestions`: if set to true, the tool will rank the suggestions, based on importance. Default is false.
|
- `rank_suggestions`: if set to true, the tool will rank the suggestions, based on importance. Default is false.
|
||||||
|
- `include_improved_code`: if set to true, the tool will include an improved code implementation in the suggestion. Default is true.
|
||||||
|
|
||||||
#### params for '/improve --extended' mode
|
#### params for '/improve --extended' mode
|
||||||
- `num_code_suggestions_per_chunk`: number of code suggestions provided by the 'improve' tool, per chunk. Default is 8.
|
- `num_code_suggestions_per_chunk`: number of code suggestions provided by the 'improve' tool, per chunk. Default is 8.
|
||||||
|
@ -264,20 +264,11 @@ def _get_all_deployments(all_models: List[str]) -> List[str]:
|
|||||||
|
|
||||||
def find_line_number_of_relevant_line_in_file(diff_files: List[FilePatchInfo],
|
def find_line_number_of_relevant_line_in_file(diff_files: List[FilePatchInfo],
|
||||||
relevant_file: str,
|
relevant_file: str,
|
||||||
relevant_line_in_file: str) -> Tuple[int, int]:
|
relevant_line_in_file: str,
|
||||||
"""
|
absolute_position: int = None) -> Tuple[int, int]:
|
||||||
Find the line number and absolute position of a relevant line in a file.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
diff_files (List[FilePatchInfo]): A list of FilePatchInfo objects representing the patches of files.
|
|
||||||
relevant_file (str): The name of the file where the relevant line is located.
|
|
||||||
relevant_line_in_file (str): The content of the relevant line.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Tuple[int, int]: A tuple containing the line number and absolute position of the relevant line in the file.
|
|
||||||
"""
|
|
||||||
position = -1
|
position = -1
|
||||||
absolute_position = -1
|
if absolute_position is None:
|
||||||
|
absolute_position = -1
|
||||||
re_hunk_header = re.compile(
|
re_hunk_header = re.compile(
|
||||||
r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@[ ]?(.*)")
|
r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@[ ]?(.*)")
|
||||||
|
|
||||||
@ -285,30 +276,32 @@ def find_line_number_of_relevant_line_in_file(diff_files: List[FilePatchInfo],
|
|||||||
if file.filename and (file.filename.strip() == relevant_file):
|
if file.filename and (file.filename.strip() == relevant_file):
|
||||||
patch = file.patch
|
patch = file.patch
|
||||||
patch_lines = patch.splitlines()
|
patch_lines = patch.splitlines()
|
||||||
|
|
||||||
# try to find the line in the patch using difflib, with some margin of error
|
|
||||||
matches_difflib: list[str | Any] = difflib.get_close_matches(relevant_line_in_file,
|
|
||||||
patch_lines, n=3, cutoff=0.93)
|
|
||||||
if len(matches_difflib) == 1 and matches_difflib[0].startswith('+'):
|
|
||||||
relevant_line_in_file = matches_difflib[0]
|
|
||||||
|
|
||||||
delta = 0
|
delta = 0
|
||||||
start1, size1, start2, size2 = 0, 0, 0, 0
|
start1, size1, start2, size2 = 0, 0, 0, 0
|
||||||
for i, line in enumerate(patch_lines):
|
if absolute_position != -1: # matching absolute to relative
|
||||||
if line.startswith('@@'):
|
for i, line in enumerate(patch_lines):
|
||||||
delta = 0
|
# new hunk
|
||||||
match = re_hunk_header.match(line)
|
if line.startswith('@@'):
|
||||||
start1, size1, start2, size2 = map(int, match.groups()[:4])
|
delta = 0
|
||||||
elif not line.startswith('-'):
|
match = re_hunk_header.match(line)
|
||||||
delta += 1
|
start1, size1, start2, size2 = map(int, match.groups()[:4])
|
||||||
|
elif not line.startswith('-'):
|
||||||
|
delta += 1
|
||||||
|
|
||||||
|
#
|
||||||
|
absolute_position_curr = start2 + delta - 1
|
||||||
|
|
||||||
|
if absolute_position_curr == absolute_position:
|
||||||
|
position = i
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
# try to find the line in the patch using difflib, with some margin of error
|
||||||
|
matches_difflib: list[str | Any] = difflib.get_close_matches(relevant_line_in_file,
|
||||||
|
patch_lines, n=3, cutoff=0.93)
|
||||||
|
if len(matches_difflib) == 1 and matches_difflib[0].startswith('+'):
|
||||||
|
relevant_line_in_file = matches_difflib[0]
|
||||||
|
|
||||||
if relevant_line_in_file in line and line[0] != '-':
|
|
||||||
position = i
|
|
||||||
absolute_position = start2 + delta - 1
|
|
||||||
break
|
|
||||||
|
|
||||||
if position == -1 and relevant_line_in_file[0] == '+':
|
|
||||||
no_plus_line = relevant_line_in_file[1:].lstrip()
|
|
||||||
for i, line in enumerate(patch_lines):
|
for i, line in enumerate(patch_lines):
|
||||||
if line.startswith('@@'):
|
if line.startswith('@@'):
|
||||||
delta = 0
|
delta = 0
|
||||||
@ -317,12 +310,27 @@ def find_line_number_of_relevant_line_in_file(diff_files: List[FilePatchInfo],
|
|||||||
elif not line.startswith('-'):
|
elif not line.startswith('-'):
|
||||||
delta += 1
|
delta += 1
|
||||||
|
|
||||||
if no_plus_line in line and line[0] != '-':
|
if relevant_line_in_file in line and line[0] != '-':
|
||||||
# The model might add a '+' to the beginning of the relevant_line_in_file even if originally
|
|
||||||
# it's a context line
|
|
||||||
position = i
|
position = i
|
||||||
absolute_position = start2 + delta - 1
|
absolute_position = start2 + delta - 1
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if position == -1 and relevant_line_in_file[0] == '+':
|
||||||
|
no_plus_line = relevant_line_in_file[1:].lstrip()
|
||||||
|
for i, line in enumerate(patch_lines):
|
||||||
|
if line.startswith('@@'):
|
||||||
|
delta = 0
|
||||||
|
match = re_hunk_header.match(line)
|
||||||
|
start1, size1, start2, size2 = map(int, match.groups()[:4])
|
||||||
|
elif not line.startswith('-'):
|
||||||
|
delta += 1
|
||||||
|
|
||||||
|
if no_plus_line in line and line[0] != '-':
|
||||||
|
# The model might add a '+' to the beginning of the relevant_line_in_file even if originally
|
||||||
|
# it's a context line
|
||||||
|
position = i
|
||||||
|
absolute_position = start2 + delta - 1
|
||||||
|
break
|
||||||
return position, absolute_position
|
return position, absolute_position
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,9 +174,6 @@ class AzureDevopsProvider:
|
|||||||
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
||||||
raise NotImplementedError("Azure DevOps provider does not support publishing inline comment yet")
|
raise NotImplementedError("Azure DevOps provider does not support publishing inline comment yet")
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
|
||||||
raise NotImplementedError("Azure DevOps provider does not support creating inline comments yet")
|
|
||||||
|
|
||||||
def publish_inline_comments(self, comments: list[dict]):
|
def publish_inline_comments(self, comments: list[dict]):
|
||||||
raise NotImplementedError("Azure DevOps provider does not support publishing inline comments yet")
|
raise NotImplementedError("Azure DevOps provider does not support publishing inline comments yet")
|
||||||
|
|
||||||
|
@ -201,8 +201,10 @@ class BitbucketProvider(GitProvider):
|
|||||||
get_logger().exception(f"Failed to remove comment, error: {e}")
|
get_logger().exception(f"Failed to remove comment, error: {e}")
|
||||||
|
|
||||||
# funtion to create_inline_comment
|
# funtion to create_inline_comment
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str, absolute_position: int = None):
|
||||||
position, absolute_position = find_line_number_of_relevant_line_in_file(self.get_diff_files(), relevant_file.strip('`'), relevant_line_in_file)
|
position, absolute_position = find_line_number_of_relevant_line_in_file(self.get_diff_files(),
|
||||||
|
relevant_file.strip('`'),
|
||||||
|
relevant_line_in_file, absolute_position)
|
||||||
if position == -1:
|
if position == -1:
|
||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
get_logger().info(f"Could not find position for {relevant_file} {relevant_line_in_file}")
|
get_logger().info(f"Could not find position for {relevant_file} {relevant_line_in_file}")
|
||||||
|
@ -210,11 +210,14 @@ class BitbucketServerProvider(GitProvider):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# funtion to create_inline_comment
|
# funtion to create_inline_comment
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str,
|
||||||
|
absolute_position: int = None):
|
||||||
|
|
||||||
position, absolute_position = find_line_number_of_relevant_line_in_file(
|
position, absolute_position = find_line_number_of_relevant_line_in_file(
|
||||||
self.get_diff_files(),
|
self.get_diff_files(),
|
||||||
relevant_file.strip('`'),
|
relevant_file.strip('`'),
|
||||||
relevant_line_in_file
|
relevant_line_in_file,
|
||||||
|
absolute_position
|
||||||
)
|
)
|
||||||
if position == -1:
|
if position == -1:
|
||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
|
@ -229,9 +229,6 @@ class CodeCommitProvider(GitProvider):
|
|||||||
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/codecommit/client/post_comment_for_compared_commit.html
|
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/codecommit/client/post_comment_for_compared_commit.html
|
||||||
raise NotImplementedError("CodeCommit provider does not support publishing inline comments yet")
|
raise NotImplementedError("CodeCommit provider does not support publishing inline comments yet")
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
|
||||||
raise NotImplementedError("CodeCommit provider does not support creating inline comments yet")
|
|
||||||
|
|
||||||
def publish_inline_comments(self, comments: list[dict]):
|
def publish_inline_comments(self, comments: list[dict]):
|
||||||
raise NotImplementedError("CodeCommit provider does not support publishing inline comments yet")
|
raise NotImplementedError("CodeCommit provider does not support publishing inline comments yet")
|
||||||
|
|
||||||
|
@ -380,11 +380,6 @@ class GerritProvider(GitProvider):
|
|||||||
'Publishing inline comments is not implemented for the gerrit '
|
'Publishing inline comments is not implemented for the gerrit '
|
||||||
'provider')
|
'provider')
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str,
|
|
||||||
relevant_line_in_file: str):
|
|
||||||
raise NotImplementedError(
|
|
||||||
'Creating inline comments is not implemented for the gerrit '
|
|
||||||
'provider')
|
|
||||||
|
|
||||||
def publish_labels(self, labels):
|
def publish_labels(self, labels):
|
||||||
# Not applicable to the local git provider,
|
# Not applicable to the local git provider,
|
||||||
|
@ -106,9 +106,9 @@ class GitProvider(ABC):
|
|||||||
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str,
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
absolute_position: int = None):
|
||||||
pass
|
raise NotImplementedError("This git provider does not support creating inline comments yet")
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def publish_inline_comments(self, comments: list[dict]):
|
def publish_inline_comments(self, comments: list[dict]):
|
||||||
|
@ -206,8 +206,12 @@ class GithubProvider(GitProvider):
|
|||||||
self.publish_inline_comments([self.create_inline_comment(body, relevant_file, relevant_line_in_file)])
|
self.publish_inline_comments([self.create_inline_comment(body, relevant_file, relevant_line_in_file)])
|
||||||
|
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str,
|
||||||
position, absolute_position = find_line_number_of_relevant_line_in_file(self.diff_files, relevant_file.strip('`'), relevant_line_in_file)
|
absolute_position: int = None):
|
||||||
|
position, absolute_position = find_line_number_of_relevant_line_in_file(self.diff_files,
|
||||||
|
relevant_file.strip('`'),
|
||||||
|
relevant_line_in_file,
|
||||||
|
absolute_position)
|
||||||
if position == -1:
|
if position == -1:
|
||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
get_logger().info(f"Could not find position for {relevant_file} {relevant_line_in_file}")
|
get_logger().info(f"Could not find position for {relevant_file} {relevant_line_in_file}")
|
||||||
|
@ -183,7 +183,7 @@ class GitLabProvider(GitProvider):
|
|||||||
self.send_inline_comment(body, edit_type, found, relevant_file, relevant_line_in_file, source_line_no,
|
self.send_inline_comment(body, edit_type, found, relevant_file, relevant_line_in_file, source_line_no,
|
||||||
target_file, target_line_no)
|
target_file, target_line_no)
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str, position: int = None):
|
||||||
raise NotImplementedError("Gitlab provider does not support creating inline comments yet")
|
raise NotImplementedError("Gitlab provider does not support creating inline comments yet")
|
||||||
|
|
||||||
def create_inline_comments(self, comments: list[dict]):
|
def create_inline_comments(self, comments: list[dict]):
|
||||||
|
@ -121,9 +121,6 @@ class LocalGitProvider(GitProvider):
|
|||||||
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
||||||
raise NotImplementedError('Publishing inline comments is not implemented for the local git provider')
|
raise NotImplementedError('Publishing inline comments is not implemented for the local git provider')
|
||||||
|
|
||||||
def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
|
|
||||||
raise NotImplementedError('Creating inline comments is not implemented for the local git provider')
|
|
||||||
|
|
||||||
def publish_inline_comments(self, comments: list[dict]):
|
def publish_inline_comments(self, comments: list[dict]):
|
||||||
raise NotImplementedError('Publishing inline comments is not implemented for the local git provider')
|
raise NotImplementedError('Publishing inline comments is not implemented for the local git provider')
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ include_generated_by_header=true
|
|||||||
[pr_code_suggestions] # /improve #
|
[pr_code_suggestions] # /improve #
|
||||||
num_code_suggestions=4
|
num_code_suggestions=4
|
||||||
summarize = false
|
summarize = false
|
||||||
|
include_improved_code = true
|
||||||
extra_instructions = ""
|
extra_instructions = ""
|
||||||
rank_suggestions = false
|
rank_suggestions = false
|
||||||
# params for '/improve --extended' mode
|
# params for '/improve --extended' mode
|
||||||
|
@ -116,7 +116,8 @@ class PRCodeSuggestions:
|
|||||||
|
|
||||||
def _prepare_pr_code_suggestions(self) -> Dict:
|
def _prepare_pr_code_suggestions(self) -> Dict:
|
||||||
review = self.prediction.strip()
|
review = self.prediction.strip()
|
||||||
data = load_yaml(review, keys_fix_yaml=["relevant_file", "suggestion_content", "existing_code", "improved_code"])
|
data = load_yaml(review,
|
||||||
|
keys_fix_yaml=["relevant_file", "suggestion_content", "existing_code", "improved_code"])
|
||||||
if isinstance(data, list):
|
if isinstance(data, list):
|
||||||
data = {'code_suggestions': data}
|
data = {'code_suggestions': data}
|
||||||
|
|
||||||
@ -126,7 +127,8 @@ class PRCodeSuggestions:
|
|||||||
if suggestion['existing_code'] != suggestion['improved_code']:
|
if suggestion['existing_code'] != suggestion['improved_code']:
|
||||||
suggestion_list.append(suggestion)
|
suggestion_list.append(suggestion)
|
||||||
else:
|
else:
|
||||||
get_logger().debug(f"Skipping suggestion {i + 1}, because existing code is equal to improved code {suggestion['existing_code']}")
|
get_logger().debug(
|
||||||
|
f"Skipping suggestion {i + 1}, because existing code is equal to improved code {suggestion['existing_code']}")
|
||||||
data['code_suggestions'] = suggestion_list
|
data['code_suggestions'] = suggestion_list
|
||||||
|
|
||||||
return data
|
return data
|
||||||
@ -147,23 +149,40 @@ class PRCodeSuggestions:
|
|||||||
relevant_lines_end = int(d['relevant_lines_end'])
|
relevant_lines_end = int(d['relevant_lines_end'])
|
||||||
content = d['suggestion_content'].rstrip()
|
content = d['suggestion_content'].rstrip()
|
||||||
new_code_snippet = d['improved_code'].rstrip()
|
new_code_snippet = d['improved_code'].rstrip()
|
||||||
|
label = d['label'].strip()
|
||||||
|
|
||||||
if new_code_snippet:
|
if new_code_snippet:
|
||||||
new_code_snippet = self.dedent_code(relevant_file, relevant_lines_start, new_code_snippet)
|
new_code_snippet = self.dedent_code(relevant_file, relevant_lines_start, new_code_snippet)
|
||||||
|
|
||||||
body = f"**Suggestion:** {content}\n```suggestion\n" + new_code_snippet + "\n```"
|
if get_settings().pr_code_suggestions.include_improved_code:
|
||||||
code_suggestions.append({'body': body, 'relevant_file': relevant_file,
|
body = f"**Suggestion:** {content} [{label}]\n```suggestion\n" + new_code_snippet + "\n```"
|
||||||
'relevant_lines_start': relevant_lines_start,
|
code_suggestions.append({'body': body, 'relevant_file': relevant_file,
|
||||||
'relevant_lines_end': relevant_lines_end})
|
'relevant_lines_start': relevant_lines_start,
|
||||||
|
'relevant_lines_end': relevant_lines_end})
|
||||||
|
else:
|
||||||
|
if self.git_provider.is_supported("create_inline_comment"):
|
||||||
|
body = f"**Suggestion:** {content} [{label}]"
|
||||||
|
comment = self.git_provider.create_inline_comment(body, relevant_file, "",
|
||||||
|
absolute_position=relevant_lines_end)
|
||||||
|
if comment:
|
||||||
|
code_suggestions.append(comment)
|
||||||
|
else:
|
||||||
|
get_logger().error("Inline comments are not supported by the git provider")
|
||||||
except Exception:
|
except Exception:
|
||||||
if get_settings().config.verbosity_level >= 2:
|
if get_settings().config.verbosity_level >= 2:
|
||||||
get_logger().info(f"Could not parse suggestion: {d}")
|
get_logger().info(f"Could not parse suggestion: {d}")
|
||||||
|
|
||||||
is_successful = self.git_provider.publish_code_suggestions(code_suggestions)
|
if get_settings().pr_code_suggestions.include_improved_code:
|
||||||
|
is_successful = self.git_provider.publish_code_suggestions(code_suggestions)
|
||||||
|
else:
|
||||||
|
is_successful = self.git_provider.publish_inline_comments(code_suggestions)
|
||||||
if not is_successful:
|
if not is_successful:
|
||||||
get_logger().info("Failed to publish code suggestions, trying to publish each suggestion separately")
|
get_logger().info("Failed to publish code suggestions, trying to publish each suggestion separately")
|
||||||
for code_suggestion in code_suggestions:
|
for code_suggestion in code_suggestions:
|
||||||
self.git_provider.publish_code_suggestions([code_suggestion])
|
if get_settings().pr_code_suggestions.include_improved_code:
|
||||||
|
self.git_provider.publish_code_suggestions([code_suggestion])
|
||||||
|
else:
|
||||||
|
self.git_provider.publish_inline_comments([code_suggestion])
|
||||||
|
|
||||||
def dedent_code(self, relevant_file, relevant_lines_start, new_code_snippet):
|
def dedent_code(self, relevant_file, relevant_lines_start, new_code_snippet):
|
||||||
try: # dedent code snippet
|
try: # dedent code snippet
|
||||||
@ -275,7 +294,7 @@ class PRCodeSuggestions:
|
|||||||
code_snippet_link = self.git_provider.get_line_link(s['relevant_file'], s['relevant_lines_start'],
|
code_snippet_link = self.git_provider.get_line_link(s['relevant_file'], s['relevant_lines_start'],
|
||||||
s['relevant_lines_end'])
|
s['relevant_lines_end'])
|
||||||
label = s['label'].strip()
|
label = s['label'].strip()
|
||||||
data_markdown += f"\n💡 Type: [{label}]\n\n**{s['suggestion_content'].rstrip().rstrip()}**\n\n"
|
data_markdown += f"\n💡 [{label}]\n\n**{s['suggestion_content'].rstrip().rstrip()}**\n\n"
|
||||||
if code_snippet_link:
|
if code_snippet_link:
|
||||||
data_markdown += f" File: [{s['relevant_file']} ({s['relevant_lines_start']}-{s['relevant_lines_end']})]({code_snippet_link})\n\n"
|
data_markdown += f" File: [{s['relevant_file']} ({s['relevant_lines_start']}-{s['relevant_lines_end']})]({code_snippet_link})\n\n"
|
||||||
else:
|
else:
|
||||||
@ -296,5 +315,3 @@ class PRCodeSuggestions:
|
|||||||
self.git_provider.publish_comment(data_markdown)
|
self.git_provider.publish_comment(data_markdown)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
get_logger().info(f"Failed to publish summarized code suggestions, error: {e}")
|
get_logger().info(f"Failed to publish summarized code suggestions, error: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user