publish_output instead publish_review

This commit is contained in:
mrT23
2023-07-18 08:05:42 +03:00
parent 539edcad3c
commit 5fbaa4366f
6 changed files with 11 additions and 11 deletions

View File

@ -1,7 +1,7 @@
[config]
model="gpt-4-0613"
git_provider="github"
publish_review=true
publish_output=true
verbosity_level=0 # 0,1,2
[pr_reviewer]

View File

@ -42,7 +42,7 @@ class PRCodeSuggestions:
assert type(self.git_provider) != BitbucketProvider, "Bitbucket is not supported for now"
logging.info('Generating code suggestions for PR...')
if settings.config.publish_review:
if settings.config.publish_output:
self.git_provider.publish_comment("Preparing review...", is_temporary=True)
logging.info('Getting PR diff...')
@ -56,7 +56,7 @@ class PRCodeSuggestions:
self.prediction = await self._get_prediction()
logging.info('Preparing PR review...')
data = self._prepare_pr_code_suggestions()
if settings.config.publish_review:
if settings.config.publish_output:
logging.info('Pushing PR review...')
self.git_provider.remove_initial_comment()
logging.info('Pushing inline code comments...')

View File

@ -36,7 +36,7 @@ class PRDescription:
async def describe(self):
logging.info('Generating a PR description...')
if settings.config.publish_review:
if settings.config.publish_output:
self.git_provider.publish_comment("Preparing pr description...", is_temporary=True)
logging.info('Getting PR diff...')
self.patches_diff = get_pr_diff(self.git_provider, self.token_handler)
@ -44,7 +44,7 @@ class PRDescription:
self.prediction = await self._get_prediction()
logging.info('Preparing answer...')
pr_title, pr_body = self._prepare_pr_answer()
if settings.config.publish_review:
if settings.config.publish_output:
logging.info('Pushing answer...')
self.git_provider.publish_description(pr_title, pr_body)
self.git_provider.remove_initial_comment()

View File

@ -34,7 +34,7 @@ class PRInformationFromUser:
async def generate_questions(self):
logging.info('Generating question to the user...')
if settings.config.publish_review:
if settings.config.publish_output:
self.git_provider.publish_comment("Preparing answer...", is_temporary=True)
logging.info('Getting PR diff...')
self.patches_diff = get_pr_diff(self.git_provider, self.token_handler)
@ -42,7 +42,7 @@ class PRInformationFromUser:
self.prediction = await self._get_prediction()
logging.info('Preparing questions...')
pr_comment = self._prepare_pr_answer()
if settings.config.publish_review:
if settings.config.publish_output:
logging.info('Pushing questions...')
self.git_provider.publish_comment(pr_comment)
self.git_provider.remove_initial_comment()

View File

@ -36,7 +36,7 @@ class PRQuestions:
async def answer(self):
logging.info('Answering a PR question...')
if settings.config.publish_review:
if settings.config.publish_output:
self.git_provider.publish_comment("Preparing answer...", is_temporary=True)
logging.info('Getting PR diff...')
self.patches_diff = get_pr_diff(self.git_provider, self.token_handler)
@ -44,7 +44,7 @@ class PRQuestions:
self.prediction = await self._get_prediction()
logging.info('Preparing answer...')
pr_comment = self._prepare_pr_answer()
if settings.config.publish_review:
if settings.config.publish_output:
logging.info('Pushing answer...')
self.git_provider.publish_comment(pr_comment)
self.git_provider.remove_initial_comment()

View File

@ -48,7 +48,7 @@ class PRReviewer:
async def review(self):
logging.info('Reviewing PR...')
if settings.config.publish_review:
if settings.config.publish_output:
self.git_provider.publish_comment("Preparing review...", is_temporary=True)
logging.info('Getting PR diff...')
self.patches_diff = get_pr_diff(self.git_provider, self.token_handler)
@ -56,7 +56,7 @@ class PRReviewer:
self.prediction = await self._get_prediction()
logging.info('Preparing PR review...')
pr_comment = self._prepare_pr_review()
if settings.config.publish_review:
if settings.config.publish_output:
logging.info('Pushing PR review...')
self.git_provider.publish_comment(pr_comment)
self.git_provider.remove_initial_comment()