pr-agent/pr_agent/tools
Zohar Meir 816ddeeb9e
Fix call to _get_previous_review_comment
Hey @mrT23, I thinks there's a problem with moving this line to after `self.git_provider.publish_comment(pr_comment)`.

The reason I originally placed it here is because otherwise, if you run `/review --pr_reviewer.remove_previous_review_comment=true` it will publish your review and then immediately after delete it, because it will look for the previous review comment only after you published your new review - so it will take your new review as the previous one. In order to get the real "previous" review you must collect the comments list before publishing a review, so placing this method call first ensures that.

The method `self._get_previous_review_comment()` is a no-op if `pr_reviewer.remove_previous_review_comment=false` so I see no downside in keeping it before `self.git_provider.publish_comment(pr_comment)`

Additionally, the check for `if previous_review_comment:` is redundant because it's done internally in `self._remove_previous_review_comment`. I thought it looked cleaner without this extra nesting here, but if you think more verbosity is better I'll keep it.
2023-10-30 09:06:51 +02:00
..
__init__.py Initial commit - PR-Agent OSS release 2023-07-06 00:21:08 +03:00
pr_add_docs.py Add docs editable blacklist of file extensions like sql, yaml... 2023-10-17 18:50:39 +03:00
pr_code_suggestions.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
pr_config.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
pr_description.py enable_custom_labels 2023-10-29 11:40:36 +02:00
pr_generate_labels.py fix labels 2023-10-29 08:58:12 +02:00
pr_information_from_user.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
pr_questions.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
pr_reviewer.py Fix call to _get_previous_review_comment 2023-10-30 09:06:51 +02:00
pr_similar_issue.py quick fix 2023-10-19 17:24:37 +03:00
pr_update_changelog.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00