Skip to content

Commit

Permalink
fixed review
Browse files Browse the repository at this point in the history
  • Loading branch information
mrT23 committed Oct 29, 2023
1 parent 5f32e28 commit c895657
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pr_agent/algo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def parse_code_suggestion(code_suggestions: dict, gfm_supported: bool=True) -> s
markdown_text += f" **{sub_key}:** {sub_value}\n"
if not gfm_supported:
if "relevant line" not in sub_key.lower(): # nicer presentation
markdown_text = markdown_text.rstrip('\n') + "\\\n"
# markdown_text = markdown_text.rstrip('\n') + "\\\n" # works for gitlab
markdown_text = markdown_text.rstrip('\n') + " \n" # works for gitlab and bitbucker

markdown_text += "\n"
return markdown_text
Expand Down
5 changes: 3 additions & 2 deletions pr_agent/tools/pr_reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ async def run(self) -> None:

if get_settings().config.publish_output:
get_logger().info('Pushing PR review...')
previous_review_comment = self._get_previous_review_comment()
self.git_provider.publish_comment(pr_comment)
self.git_provider.remove_initial_comment()
self._remove_previous_review_comment(previous_review_comment)
previous_review_comment = self._get_previous_review_comment()
if previous_review_comment:
self._remove_previous_review_comment(previous_review_comment)
if get_settings().pr_reviewer.inline_code_comments:
get_logger().info('Pushing inline code comments...')
self._publish_inline_code_comments()
Expand Down

0 comments on commit c895657

Please sign in to comment.