mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 10:55:17 +00:00
publish each suggestion seperatly only on gitlab
This commit is contained in:
parent
66a5f06b45
commit
1b3fb49f9c
2 changed files with 6 additions and 2 deletions
|
|
@ -196,6 +196,10 @@ class GitLabProvider(GitProvider):
|
|||
return self.last_diff # fallback to last_diff if no relevant diff is found
|
||||
|
||||
def publish_code_suggestions(self, code_suggestions: list) -> bool:
|
||||
if len(code_suggestions) > 1:
|
||||
logging.debug(f"in gitlab we dont currently support publishing multiple code suggestions simultaneously")
|
||||
return False
|
||||
|
||||
for suggestion in code_suggestions:
|
||||
try:
|
||||
body = suggestion['body']
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@ class PRCodeSuggestions:
|
|||
if get_settings().config.verbosity_level >= 2:
|
||||
logging.info(f"Could not parse suggestion: {d}")
|
||||
|
||||
# is_successful = self.git_provider.publish_code_suggestions(code_suggestions)
|
||||
if True:
|
||||
is_successful = self.git_provider.publish_code_suggestions(code_suggestions)
|
||||
if not is_successful:
|
||||
# logging.info("Failed to publish code suggestions, trying to publish each suggestion separately")
|
||||
for code_suggestion in code_suggestions:
|
||||
self.git_provider.publish_code_suggestions([code_suggestion])
|
||||
|
|
|
|||
Loading…
Reference in a new issue