move enable custom labels to custom labels function

This commit is contained in:
Hussam.lawen
2023-10-27 21:12:58 +03:00
parent a7cb59ca8b
commit f53ec1d0cc
5 changed files with 6 additions and 4 deletions

View File

@ -37,7 +37,6 @@ extra_instructions = ""
# markers
use_description_markers=false
include_generated_by_header=true
enable_custom_labels=false
#custom_labels = ['Bug fix', 'Tests', 'Bug fix with tests', 'Refactoring', 'Enhancement', 'Documentation', 'Other']

View File

@ -1,3 +1,5 @@
enable_custom_labels=true
[custom_labels."Bug fix"]
description = "Fixes a bug in the code"
[custom_labels."Tests"]

View File

@ -43,7 +43,7 @@ class PRDescription:
"use_bullet_points": get_settings().pr_description.use_bullet_points,
"extra_instructions": get_settings().pr_description.extra_instructions,
"commit_messages_str": self.git_provider.get_commit_messages(),
"enable_custom_labels": get_settings().pr_description.enable_custom_labels,
"enable_custom_labels": get_settings().enable_custom_labels,
"custom_labels": "",
"custom_labels_examples": "",
}

View File

@ -45,7 +45,7 @@ class PRGenerateLabels:
"commit_messages_str": self.git_provider.get_commit_messages(),
"custom_labels": "",
"custom_labels_examples": "",
"enable_custom_labels": get_settings().pr_description.enable_custom_labels,
"enable_custom_labels": get_settings().enable_custom_labels,
}
# Initialize the token handler

View File

@ -63,7 +63,8 @@ class PRReviewer:
'answer_str': answer_str,
"extra_instructions": get_settings().pr_reviewer.extra_instructions,
"commit_messages_str": self.git_provider.get_commit_messages(),
"custom_labels": ""
"custom_labels": "",
"enable_custom_labels": get_settings().enable_custom_labels,
}
self.token_handler = TokenHandler(