diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 2f3a322a..ff940e04 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -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'] diff --git a/pr_agent/settings/custom_labels.toml b/pr_agent/settings/custom_labels.toml index 5891daa7..a8be2317 100644 --- a/pr_agent/settings/custom_labels.toml +++ b/pr_agent/settings/custom_labels.toml @@ -1,3 +1,5 @@ +enable_custom_labels=true + [custom_labels."Bug fix"] description = "Fixes a bug in the code" [custom_labels."Tests"] diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index cacfdad6..a88ff336 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -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": "", } diff --git a/pr_agent/tools/pr_generate_labels.py b/pr_agent/tools/pr_generate_labels.py index 81b1d040..bf5b5f98 100644 --- a/pr_agent/tools/pr_generate_labels.py +++ b/pr_agent/tools/pr_generate_labels.py @@ -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 diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index b9aa5481..0eeb5578 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -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(