Revert "generate labels keep user labels only"

This reverts commit 94a2a5e527.
This commit is contained in:
Hussam.lawen
2023-11-06 15:08:29 +02:00
parent 94a2a5e527
commit ec3f2fb485
4 changed files with 9 additions and 26 deletions

View File

@ -324,20 +324,3 @@ def set_custom_labels(variables):
final_labels += f" - {k} ({v['description']})\n"
variables["custom_labels"] = final_labels
variables["custom_labels_examples"] = f" - {list(labels.keys())[0]}"
def get_user_labels(current_labels):
## Only keep labels that has been added by the user
if current_labels is None:
current_labels = []
user_labels = []
for label in current_labels:
if label in ['Bug fix', 'Tests', 'Refactoring', 'Enhancement', 'Documentation', 'Other']:
continue
if get_settings().config.enable_custom_labels:
if label in get_settings().custom_labels:
continue
user_labels.append(label)
if user_labels:
get_logger().info(f"Keeping user labels: {user_labels}")
return user_labels