@@ -164,6 +164,14 @@ def _turn_env_vars_into_dict(ctx, params, value):
164164 default = "coverage" ,
165165 type = click .Choice (["coverage" , "test_results" ]),
166166 ),
167+ click .option (
168+ "--network-filter" ,
169+ help = "Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing" ,
170+ ),
171+ click .option (
172+ "--network-prefix" ,
173+ help = "Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing" ,
174+ ),
167175]
168176
169177
@@ -181,29 +189,31 @@ def do_upload(
181189 ctx : click .Context ,
182190 commit_sha : str ,
183191 report_code : str ,
192+ branch : typing .Optional [str ],
184193 build_code : typing .Optional [str ],
185194 build_url : typing .Optional [str ],
186- job_code : typing .Optional [str ],
195+ disable_file_fixes : bool ,
196+ disable_search : bool ,
197+ dry_run : bool ,
187198 env_vars : typing .Dict [str , str ],
199+ fail_on_error : bool ,
200+ files_search_exclude_folders : typing .List [pathlib .Path ],
201+ files_search_explicitly_listed_files : typing .List [pathlib .Path ],
202+ files_search_root_folder : pathlib .Path ,
188203 flags : typing .List [str ],
204+ git_service : typing .Optional [str ],
205+ handle_no_reports_found : bool ,
206+ job_code : typing .Optional [str ],
189207 name : typing .Optional [str ],
208+ network_filter : typing .Optional [str ],
209+ network_prefix : typing .Optional [str ],
190210 network_root_folder : pathlib .Path ,
191- files_search_root_folder : pathlib .Path ,
192- files_search_exclude_folders : typing .List [pathlib .Path ],
193- files_search_explicitly_listed_files : typing .List [pathlib .Path ],
194- disable_search : bool ,
195- disable_file_fixes : bool ,
196- token : typing .Optional [str ],
197211 plugin_names : typing .List [str ],
198- branch : typing .Optional [str ],
199- slug : typing .Optional [str ],
200212 pull_request_number : typing .Optional [str ],
201- use_legacy_uploader : bool ,
202- fail_on_error : bool ,
203- dry_run : bool ,
204- git_service : typing .Optional [str ],
205- handle_no_reports_found : bool ,
206213 report_type : str ,
214+ slug : typing .Optional [str ],
215+ token : typing .Optional [str ],
216+ use_legacy_uploader : bool ,
207217):
208218 versioning_system = ctx .obj ["versioning_system" ]
209219 codecov_yaml = ctx .obj ["codecov_yaml" ] or {}
@@ -214,60 +224,64 @@ def do_upload(
214224 "Starting upload processing" ,
215225 extra = dict (
216226 extra_log_attributes = dict (
217- upload_file_type = report_type ,
218- commit_sha = commit_sha ,
219- report_code = report_code ,
227+ branch = branch ,
220228 build_code = build_code ,
221229 build_url = build_url ,
222- job_code = job_code ,
230+ commit_sha = commit_sha ,
231+ disable_file_fixes = disable_file_fixes ,
232+ disable_search = disable_search ,
233+ enterprise_url = enterprise_url ,
223234 env_vars = env_vars ,
235+ files_search_exclude_folders = files_search_exclude_folders ,
236+ files_search_explicitly_listed_files = files_search_explicitly_listed_files ,
237+ files_search_root_folder = files_search_root_folder ,
224238 flags = flags ,
239+ git_service = git_service ,
240+ handle_no_reports_found = handle_no_reports_found ,
241+ job_code = job_code ,
225242 name = name ,
243+ network_filter = network_filter ,
244+ network_prefix = network_prefix ,
226245 network_root_folder = network_root_folder ,
227- files_search_root_folder = files_search_root_folder ,
228- files_search_exclude_folders = files_search_exclude_folders ,
229- files_search_explicitly_listed_files = files_search_explicitly_listed_files ,
230246 plugin_names = plugin_names ,
231- token = token ,
232- branch = branch ,
233- slug = slug ,
234247 pull_request_number = pull_request_number ,
235- git_service = git_service ,
236- enterprise_url = enterprise_url ,
237- disable_search = disable_search ,
238- disable_file_fixes = disable_file_fixes ,
239- handle_no_reports_found = handle_no_reports_found ,
248+ report_code = report_code ,
249+ slug = slug ,
250+ token = token ,
251+ upload_file_type = report_type ,
240252 )
241253 ),
242254 )
243255 do_upload_logic (
244256 cli_config ,
245257 versioning_system ,
246258 ci_adapter ,
247- upload_file_type = report_type ,
248- commit_sha = commit_sha ,
249- report_code = report_code ,
259+ branch = branch ,
250260 build_code = build_code ,
251261 build_url = build_url ,
252- job_code = job_code ,
262+ commit_sha = commit_sha ,
263+ disable_file_fixes = disable_file_fixes ,
264+ disable_search = disable_search ,
265+ dry_run = dry_run ,
266+ enterprise_url = enterprise_url ,
253267 env_vars = env_vars ,
268+ fail_on_error = fail_on_error ,
269+ files_search_exclude_folders = list (files_search_exclude_folders ),
270+ files_search_explicitly_listed_files = list (files_search_explicitly_listed_files ),
271+ files_search_root_folder = files_search_root_folder ,
254272 flags = flags ,
273+ git_service = git_service ,
274+ handle_no_reports_found = handle_no_reports_found ,
275+ job_code = job_code ,
255276 name = name ,
277+ network_filter = network_filter ,
278+ network_prefix = network_prefix ,
256279 network_root_folder = network_root_folder ,
257- files_search_root_folder = files_search_root_folder ,
258- files_search_exclude_folders = list (files_search_exclude_folders ),
259- files_search_explicitly_listed_files = list (files_search_explicitly_listed_files ),
260280 plugin_names = plugin_names ,
261- token = token ,
262- branch = branch ,
263- slug = slug ,
264281 pull_request_number = pull_request_number ,
282+ report_code = report_code ,
283+ slug = slug ,
284+ token = token ,
285+ upload_file_type = report_type ,
265286 use_legacy_uploader = use_legacy_uploader ,
266- fail_on_error = fail_on_error ,
267- dry_run = dry_run ,
268- git_service = git_service ,
269- enterprise_url = enterprise_url ,
270- disable_search = disable_search ,
271- handle_no_reports_found = handle_no_reports_found ,
272- disable_file_fixes = disable_file_fixes ,
273287 )
0 commit comments