Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 3daff9a

Browse files
committed
Refactored upload-process to upload-coverage
1 parent 998e09f commit 3daff9a

File tree

7 files changed

+34
-312
lines changed

7 files changed

+34
-312
lines changed

codecov_cli/commands/combined_upload.py

Lines changed: 0 additions & 289 deletions
This file was deleted.

codecov_cli/commands/upload_process.py renamed to codecov_cli/commands/upload_coverage.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
import click
66

7-
from codecov_cli.commands.combined_upload import combined_upload
87
from codecov_cli.commands.commit import create_commit
98
from codecov_cli.commands.report import create_report
109
from codecov_cli.commands.upload import do_upload, global_upload_options
1110
from codecov_cli.helpers.args import get_cli_args
1211
from codecov_cli.helpers.options import global_options
12+
from codecov_cli.services.upload_coverage import upload_coverage_logic
1313
from codecov_cli.types import CommandContext
1414

1515
logger = logging.getLogger("codecovcli")
@@ -24,7 +24,7 @@
2424
help="SHA (with 40 chars) of what should be the parent of this commit",
2525
)
2626
@click.pass_context
27-
def upload_process(
27+
def upload_coverage(
2828
ctx: CommandContext,
2929
branch: typing.Optional[str],
3030
build_code: typing.Optional[str],
@@ -62,22 +62,32 @@ def upload_process(
6262
):
6363
args = get_cli_args(ctx)
6464
logger.debug(
65-
"Starting upload process",
65+
"Starting upload coverage",
6666
extra=dict(
6767
extra_log_attributes=args,
6868
),
6969
)
7070

7171
if not use_legacy_uploader and report_type == "coverage":
72+
versioning_system = ctx.obj["versioning_system"]
73+
codecov_yaml = ctx.obj["codecov_yaml"] or {}
74+
cli_config = codecov_yaml.get("cli", {})
75+
ci_adapter = ctx.obj.get("ci_adapter")
76+
enterprise_url = ctx.obj.get("enterprise_url")
77+
args = get_cli_args(ctx)
7278
ctx.invoke(
73-
combined_upload,
79+
upload_coverage_logic,
80+
cli_config,
81+
versioning_system,
82+
ci_adapter,
7483
branch=branch,
7584
build_code=build_code,
7685
build_url=build_url,
7786
commit_sha=commit_sha,
7887
disable_file_fixes=disable_file_fixes,
7988
disable_search=disable_search,
8089
dry_run=dry_run,
90+
enterprise_url=enterprise_url,
8191
env_vars=env_vars,
8292
fail_on_error=fail_on_error,
8393
files_search_exclude_folders=files_search_exclude_folders,
@@ -99,11 +109,12 @@ def upload_process(
99109
plugin_names=plugin_names,
100110
pull_request_number=pull_request_number,
101111
report_code=report_code,
102-
report_type=report_type,
103112
slug=slug,
104113
swift_project=swift_project,
105114
token=token,
115+
upload_file_type=report_type,
106116
use_legacy_uploader=use_legacy_uploader,
117+
args=args,
107118
)
108119
return
109120

codecov_cli/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from codecov_cli.commands.send_notifications import send_notifications
1717
from codecov_cli.commands.staticanalysis import static_analysis
1818
from codecov_cli.commands.upload import do_upload
19-
from codecov_cli.commands.upload_process import upload_process
19+
from codecov_cli.commands.upload_coverage import upload_coverage
2020
from codecov_cli.helpers.ci_adapters import get_ci_adapter, get_ci_providers_list
2121
from codecov_cli.helpers.config import load_cli_config
2222
from codecov_cli.helpers.logging_utils import configure_logger
@@ -74,7 +74,7 @@ def cli(
7474
cli.add_command(label_analysis)
7575
cli.add_command(static_analysis)
7676
cli.add_command(empty_upload)
77-
cli.add_command(upload_process)
77+
cli.add_command(upload_coverage)
7878
cli.add_command(send_notifications)
7979
cli.add_command(process_test_results)
8080

codecov_cli/services/upload/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def do_upload_logic(
2424
cli_config: typing.Dict,
2525
versioning_system: VersioningSystemInterface,
2626
ci_adapter: CIAdapterBase,
27-
combined_upload: bool = False,
27+
upload_coverage: bool = False,
2828
*,
2929
args: dict = None,
3030
branch: typing.Optional[str],
@@ -151,7 +151,7 @@ def do_upload_logic(
151151
git_service,
152152
enterprise_url,
153153
parent_sha,
154-
combined_upload,
154+
upload_coverage,
155155
args,
156156
)
157157
else:

0 commit comments

Comments
 (0)