pr-agent/pr_agent
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
..
agent Add /generate_labels function + fix issues 2023-10-26 23:28:33 +03:00
algo fixed review 2023-10-29 17:59:46 +02:00
git_providers Merge pull request #394 from zmeir/zmeir-external-push_trigger 2023-10-29 13:04:33 +02:00
log Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
secret_providers Enhance logging in bitbucket_app, gitlab_webhook, and google_cloud_storage_secret_provider with JSON format and additional context 2023-10-18 16:44:03 +03:00
servers Merge remote-tracking branch 'origin/main' into tr/final_fixes 2023-10-29 14:38:33 +02:00
settings Merge pull request #394 from zmeir/zmeir-external-push_trigger 2023-10-29 13:04:33 +02:00
tools Fix call to _get_previous_review_comment 2023-10-30 09:06:51 +02:00
__init__.py Initial commit - PR-Agent OSS release 2023-07-06 00:21:08 +03:00
cli.py Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
config_loader.py Add /generate_labels function + fix issues 2023-10-26 23:28:33 +03:00