Add /generate_labels function + fix issues

This commit is contained in:
Hussam.lawen
2023-10-26 23:28:33 +03:00
parent 16777a5334
commit f3bdbfc103
11 changed files with 291 additions and 22 deletions

View File

@ -306,7 +306,7 @@ def try_fix_yaml(review_text: str) -> dict:
return data
async def set_custom_labels(variables):
def set_custom_labels(variables):
labels = get_settings().custom_labels
if not labels:
# set default labels
@ -319,3 +319,4 @@ async def set_custom_labels(variables):
for k, v in labels.items():
final_labels += f" - {k} ({v['description']})\n"
variables["custom_labels"] = final_labels
variables["custom_labels_examples"] = f" - {list(labels.keys())[0]}"