Skip to content

Commit

Permalink
Merge pull request #408 from Codium-ai/tr/final_fixes
Browse files Browse the repository at this point in the history
fixed review
  • Loading branch information
mrT23 committed Oct 29, 2023
2 parents eda20cc + 71da20e commit b57ec30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- New tool - [generate_labels](https://github.com/Codium-ai/pr-agent/blob/main/docs/GENERATE_CUSTOM_LABELS.md)
- New ability to use [customize labels](https://github.com/Codium-ai/pr-agent/blob/main/docs/GENERATE_CUSTOM_LABELS.md#how-to-enable-custom-labels) on the `review` and `describe` tools.
- GitHub Action: Can now use a `.pr_agent.toml` file to control configuration parameters (see [Usage Guide](./Usage.md#working-with-github-action)).
- GitHub App: Added ability to trigger tools on push events (see [link](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L91))
- GitHub App: Added ability to trigger tools on [push events](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#github-app-automatic-tools-for-new-code-pr-push)
- Support custom domain URLs for azure devops integration (see [link](https://github.com/Codium-ai/pr-agent/pull/381)).
- PR Description default mode is now in [bullet points](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L35).

Expand Down
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 b57ec30

Please sign in to comment.