diff --git a/pr_agent/agent/pr_agent.py b/pr_agent/agent/pr_agent.py index 8dea48a5..93726d84 100644 --- a/pr_agent/agent/pr_agent.py +++ b/pr_agent/agent/pr_agent.py @@ -60,9 +60,11 @@ class PRAgent: else: action, *args = request - forbidden_cli_args = ['enable_auto_approval', 'base_url', 'url', 'app_name', 'secret_provider', - 'git_provider', 'skip_keys', 'key', 'ANALYTICS_FOLDER', 'uri', 'app_id', 'webhook_secret', - 'bearer_token', 'PERSONAL_ACCESS_TOKEN', 'override_deployment_type', 'private_key', 'api_base', 'api_type', 'api_version'] + forbidden_cli_args = ['enable_auto_approval', 'approve_pr_on_self_review', 'base_url', 'url', 'app_name', 'secret_provider', + 'git_provider', 'skip_keys', 'openai.key', 'ANALYTICS_FOLDER', 'uri', 'app_id', 'webhook_secret', + 'bearer_token', 'PERSONAL_ACCESS_TOKEN', 'override_deployment_type', 'private_key', + 'local_cache_path', 'enable_local_cache', 'jira_base_url', 'api_base', 'api_type', 'api_version', + 'skip_keys'] if args: for arg in args: if arg.startswith('--'): diff --git a/pr_agent/tools/pr_config.py b/pr_agent/tools/pr_config.py index 05750f2d..a7e75ac2 100644 --- a/pr_agent/tools/pr_config.py +++ b/pr_agent/tools/pr_config.py @@ -38,12 +38,15 @@ class PRConfig: if (header.lower().startswith("pr_") or header.lower().startswith("config")) and header.lower() in configuration_headers } - skip_keys = ['ai_disclaimer', 'ai_disclaimer_title', 'ANALYTICS_FOLDER', 'secret_provider', "skip_keys", - 'trial_prefix_message', 'no_eligible_message', 'identity_provider', 'ALLOWED_REPOS', - 'APP_NAME'] + skip_keys = ['ai_disclaimer', 'ai_disclaimer_title', 'ANALYTICS_FOLDER', 'secret_provider', "skip_keys", "app_id", "redirect", + 'trial_prefix_message', 'no_eligible_message', 'identity_provider', 'ALLOWED_REPOS', + 'APP_NAME', 'PERSONAL_ACCESS_TOKEN', 'shared_secret', 'key', 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'user_token', + 'private_key', 'private_key_id', 'client_id', 'client_secret', 'token', 'bearer_token'] extra_skip_keys = get_settings().config.get('config.skip_keys', []) if extra_skip_keys: skip_keys.extend(extra_skip_keys) + skip_keys_lower = [key.lower() for key in skip_keys] + markdown_text = "
🛠️ PR-Agent Configurations: \n\n" markdown_text += f"\n\n```yaml\n\n" @@ -52,7 +55,7 @@ class PRConfig: markdown_text += "\n\n" markdown_text += f"==================== {header} ====================" for key, value in configs.items(): - if key in skip_keys: + if key.lower() in skip_keys_lower: continue markdown_text += f"\n{header.lower()}.{key.lower()} = {repr(value) if isinstance(value, str) else value}" markdown_text += " "