mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-13 17:20:38 +08:00
Merge pull request #403 from Codium-ai/tr/fix_custom_labels
Refactoring Custom Labels Handling and Documentation Update
This commit is contained in:
@ -3,7 +3,7 @@ The `generte_labels` tool scans the PR code changes, and given a list of labels
|
|||||||
|
|
||||||
It can be invoked manually by commenting on any PR:
|
It can be invoked manually by commenting on any PR:
|
||||||
```
|
```
|
||||||
/generte_labels
|
/generate_labels
|
||||||
```
|
```
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
|
[config]
|
||||||
enable_custom_labels=false
|
enable_custom_labels=false
|
||||||
|
|
||||||
[custom_labels."Bug fix"]
|
## template for custom labels
|
||||||
description = "Fixes a bug in the code"
|
#[custom_labels."Bug fix"]
|
||||||
[custom_labels."Tests"]
|
#description = "Fixes a bug in the code"
|
||||||
description = "Adds or modifies tests"
|
#[custom_labels."Tests"]
|
||||||
[custom_labels."Bug fix with tests"]
|
#description = "Adds or modifies tests"
|
||||||
description = "Fixes a bug in the code and adds or modifies tests"
|
#[custom_labels."Bug fix with tests"]
|
||||||
[custom_labels."Refactoring"]
|
#description = "Fixes a bug in the code and adds or modifies tests"
|
||||||
description = "Code refactoring without changing functionality"
|
#[custom_labels."Refactoring"]
|
||||||
[custom_labels."Enhancement"]
|
#description = "Code refactoring without changing functionality"
|
||||||
description = "Adds new features or functionality"
|
#[custom_labels."Enhancement"]
|
||||||
[custom_labels."Documentation"]
|
#description = "Adds new features or functionality"
|
||||||
description = "Adds or modifies documentation"
|
#[custom_labels."Documentation"]
|
||||||
[custom_labels."Other"]
|
#description = "Adds or modifies documentation"
|
||||||
description = "Other changes that do not fit in any of the above categories"
|
#[custom_labels."Other"]
|
||||||
|
#description = "Other changes that do not fit in any of the above categories"
|
@ -45,7 +45,7 @@ class PRGenerateLabels:
|
|||||||
"commit_messages_str": self.git_provider.get_commit_messages(),
|
"commit_messages_str": self.git_provider.get_commit_messages(),
|
||||||
"custom_labels": "",
|
"custom_labels": "",
|
||||||
"custom_labels_examples": "",
|
"custom_labels_examples": "",
|
||||||
"enable_custom_labels": get_settings().enable_custom_labels,
|
"enable_custom_labels": get_settings().config.enable_custom_labels,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialize the token handler
|
# Initialize the token handler
|
||||||
|
@ -64,7 +64,7 @@ class PRReviewer:
|
|||||||
"extra_instructions": get_settings().pr_reviewer.extra_instructions,
|
"extra_instructions": get_settings().pr_reviewer.extra_instructions,
|
||||||
"commit_messages_str": self.git_provider.get_commit_messages(),
|
"commit_messages_str": self.git_provider.get_commit_messages(),
|
||||||
"custom_labels": "",
|
"custom_labels": "",
|
||||||
"enable_custom_labels": get_settings().enable_custom_labels,
|
"enable_custom_labels": get_settings().config.enable_custom_labels,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.token_handler = TokenHandler(
|
self.token_handler = TokenHandler(
|
||||||
|
Reference in New Issue
Block a user