-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Configurator Strikes Back #159
Conversation
PR Analysis
PR Feedback
How to use
|
PR TitleThe Configurator Strikes Back PR TypeEnhancement PR DescriptionThis PR is like a Swiss army knife for configuration settings! It allows users to modify any configuration parameter from 'configuration.toml' directly from the command line. This is the kind of flexibility that makes a contortionist jealous. It's like giving a chameleon a box of crayons and saying, 'Go nuts, buddy!' PR Main Files Walkthrough
|
Changelog updates: 2023-07-30Enhanced
|
## 2023-07-30 | ||
|
||
### Enhanced | ||
- Added the ability to modify any configuration parameter from 'configuration.toml' on-the-fly. | ||
- Updated the command line interface and bot commands to accept configuration changes as arguments. | ||
- Improved the PR agent to handle additional arguments for each action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG.md update
… tr/edit_any_config_setting
/improve --pr_code_suggestions.num_code_suggestions=1 |
self.main_language = get_main_pr_language( | ||
self.git_provider.get_languages(), self.git_provider.get_files() | ||
) | ||
self.commit_changelog = self._parse_args(args, settings) | ||
update_settings_from_args(args) | ||
self.commit_changelog = settings.pr_update_changelog.push_changelog_changes | ||
self._get_changlog_file() # self.changelog_file_str | ||
self.ai_handler = AiHandler() | ||
self.patches_diff = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The update_settings_from_args(args)
function is called before the args
variable is checked for None
. This could lead to a TypeError
if args
is None
. To prevent this, the function should be called after checking if args
is not None
.
self.main_language = get_main_pr_language( | |
self.git_provider.get_languages(), self.git_provider.get_files() | |
) | |
self.commit_changelog = self._parse_args(args, settings) | |
update_settings_from_args(args) | |
self.commit_changelog = settings.pr_update_changelog.push_changelog_changes | |
self._get_changlog_file() # self.changelog_file_str | |
self.ai_handler = AiHandler() | |
self.patches_diff = None | |
def __init__(self, pr_url: str, cli_mode=False, args: list = None): | |
self.git_provider = get_git_provider()(pr_url) | |
self.main_language = get_main_pr_language( | |
self.git_provider.get_languages(), self.git_provider.get_files() | |
) | |
if args is not None: | |
update_settings_from_args(args) | |
self.commit_changelog = settings.pr_update_changelog.push_changelog_changes | |
self._get_changlog_file() # self.changelog_file_str | |
self.ai_handler = AiHandler() | |
self.patches_diff = None |
Preparing pr description... |
5 similar comments
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
11 similar comments
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
Preparing pr description... |
…tting The Configurator Strikes Back
PR Type:
Enhancement
PR Description:
This PR is like a Swiss Army knife for our PR agent. It allows users to tweak any configuration parameter from 'configuration.toml' on-the-fly, right from the command line or bot commands. It's like giving our PR agent a new superpower, but without the need for a radioactive spider or a trip to Krypton.
PR Main Files Walkthrough:
-
pr_agent/agent/pr_agent.py
: The PR agent now takes additional arguments for each action, allowing users to modify settings on the fly.-
pr_agent/algo/utils.py
: A new functionupdate_settings_from_args
has been added to parse and apply configuration changes from the command line arguments.-
pr_agent/cli.py
: The command line interface now accepts configuration changes as arguments.-
pr_agent/servers/help.py
: The help text has been updated to include instructions for modifying configuration settings.-
pr_agent/tools/pr_code_suggestions.py
: The PR code suggestions tool now accepts additional arguments to modify settings.-
pr_agent/tools/pr_description.py
: The PR description tool now accepts additional arguments to modify settings.-
pr_agent/tools/pr_information_from_user.py
: The PR information from user tool now accepts additional arguments to modify settings.-
pr_agent/tools/pr_reviewer.py
: The PR reviewer tool now accepts additional arguments to modify settings.-
pr_agent/tools/pr_update_changelog.py
: The PR update changelog tool now accepts additional arguments to modify settings.-
pr_agent/settings/configuration.toml
: The configuration file has been updated with new fields for each tool to accept extra instructions.Extra human details:
was generated from cli with: