Skip to content

Commit b57ec30

Browse files
authored
Merge pull request #408 from Codium-ai/tr/final_fixes
fixed review
2 parents eda20cc + 71da20e commit b57ec30

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- New tool - [generate_labels](https://github.com/Codium-ai/pr-agent/blob/main/docs/GENERATE_CUSTOM_LABELS.md)
1111
- 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.
1212
- GitHub Action: Can now use a `.pr_agent.toml` file to control configuration parameters (see [Usage Guide](./Usage.md#working-with-github-action)).
13-
- 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))
13+
- 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)
1414
- Support custom domain URLs for azure devops integration (see [link](https://github.com/Codium-ai/pr-agent/pull/381)).
1515
- PR Description default mode is now in [bullet points](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L35).
1616

pr_agent/algo/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def parse_code_suggestion(code_suggestions: dict, gfm_supported: bool=True) -> s
101101
markdown_text += f" **{sub_key}:** {sub_value}\n"
102102
if not gfm_supported:
103103
if "relevant line" not in sub_key.lower(): # nicer presentation
104-
markdown_text = markdown_text.rstrip('\n') + "\\\n"
104+
# markdown_text = markdown_text.rstrip('\n') + "\\\n" # works for gitlab
105+
markdown_text = markdown_text.rstrip('\n') + " \n" # works for gitlab and bitbucker
105106

106107
markdown_text += "\n"
107108
return markdown_text

pr_agent/tools/pr_reviewer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ async def run(self) -> None:
116116

117117
if get_settings().config.publish_output:
118118
get_logger().info('Pushing PR review...')
119-
previous_review_comment = self._get_previous_review_comment()
120119
self.git_provider.publish_comment(pr_comment)
121120
self.git_provider.remove_initial_comment()
122-
self._remove_previous_review_comment(previous_review_comment)
121+
previous_review_comment = self._get_previous_review_comment()
122+
if previous_review_comment:
123+
self._remove_previous_review_comment(previous_review_comment)
123124
if get_settings().pr_reviewer.inline_code_comments:
124125
get_logger().info('Pushing inline code comments...')
125126
self._publish_inline_code_comments()

0 commit comments

Comments
 (0)