-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathcreate_report_result.py
More file actions
48 lines (43 loc) · 1.29 KB
/
create_report_result.py
File metadata and controls
48 lines (43 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import logging
import click
import sentry_sdk
from codecov_cli.helpers.args import get_cli_args
from codecov_cli.helpers.options import global_options
from codecov_cli.services.report import create_report_results_logic
from codecov_cli.types import CommandContext
logger = logging.getLogger("codecovcli")
@click.command()
@click.option(
"--code", help="The code of the report. If unsure, leave default", default="default"
)
@global_options
@click.pass_context
def create_report_results(
ctx: CommandContext,
commit_sha: str,
code: str,
slug: str,
git_service: str,
token: str,
fail_on_error: bool,
):
with sentry_sdk.start_transaction(op="task", name="Create Report Result"):
with sentry_sdk.start_span(name="create_report_result"):
enterprise_url = ctx.obj.get("enterprise_url")
args = get_cli_args(ctx)
logger.debug(
"Creating report results",
extra=dict(
extra_log_attributes=args,
),
)
create_report_results_logic(
commit_sha,
code,
slug,
git_service,
token,
enterprise_url,
fail_on_error,
args,
)