Skip to content

Commit

Permalink
move enable custom labels to custom labels function
Browse files Browse the repository at this point in the history
  • Loading branch information
hussam789 committed Oct 27, 2023
1 parent a7cb59c commit f53ec1d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion pr_agent/settings/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
2 changes: 2 additions & 0 deletions pr_agent/settings/custom_labels.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
enable_custom_labels=true

[custom_labels."Bug fix"]
description = "Fixes a bug in the code"
[custom_labels."Tests"]
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/tools/pr_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, pr_url: str, args: list = None):
"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": "",
}
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/tools/pr_generate_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, pr_url: str, args: list = None):
"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
Expand Down
3 changes: 2 additions & 1 deletion pr_agent/tools/pr_reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def __init__(self, pr_url: str, is_answer: bool = False, is_auto: bool = False,
'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(
Expand Down

0 comments on commit f53ec1d

Please sign in to comment.