Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/app/api/v1/endpoints/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ def decrypt_config(config_dict: dict, sensitive_fields: list) -> dict:
if scan_request and scan_request.file_paths:
user_config['scan_config'] = {'file_paths': scan_request.file_paths}

if scan_request:
user_config['scan_config'] = {
'exclude_patterns': scan_request.exclude_patterns or [],
'rule_set_id': scan_request.rule_set_id,
'prompt_template_id': scan_request.prompt_template_id,
}
Comment thread
H4lo marked this conversation as resolved.
Outdated
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
Outdated
# Trigger Background Task
background_tasks.add_task(scan_repo_task, task.id, AsyncSessionLocal, user_config)

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/shared/api/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ export const api = {
file_paths: task.scan_config?.file_paths,
full_scan: !task.scan_config?.file_paths || task.scan_config.file_paths.length === 0,
exclude_patterns: task.exclude_patterns || [],
branch_name: task.branch_name || "main"
branch_name: task.branch_name || "main",
rule_set_id: task.scan_config?.rule_set_id,
prompt_template_id: task.scan_config?.prompt_template_id,
};
const res = await apiClient.post(`/projects/${task.project_id}/scan`, scanRequest);
// Fetch the created task
Expand Down
10 changes: 3 additions & 7 deletions frontend/src/shared/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,11 @@ export interface CreateAuditTaskForm {
task_type: 'repository' | 'instant';
branch_name?: string;
exclude_patterns: string[];
rule_set_id?: string;
prompt_template_id?: string;
scan_config: {
include_tests?: boolean;
include_docs?: boolean;
max_file_size?: number;
analysis_depth?: 'basic' | 'standard' | 'deep';
file_paths?: string[];
};
rule_set_id?: string;
prompt_template_id?: string;
};
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
}

export interface InstantAnalysisForm {
Expand Down