diff --git a/codecov_cli/commands/empty_upload.py b/codecov_cli/commands/empty_upload.py index 463fd81c5..459b1f452 100644 --- a/codecov_cli/commands/empty_upload.py +++ b/codecov_cli/commands/empty_upload.py @@ -55,19 +55,20 @@ def empty_upload( enterprise_url = ctx.obj.get("enterprise_url") args = get_cli_args(ctx) - logger.debug("Attempting to Create Commit before doing an empty upload.") - create_commit_logic( - commit_sha, - parent_sha, - pull_request_number, - branch, - slug, - token, - git_service, - enterprise_url, - fail_on_error, - args, - ) + if parent_sha or pull_request_number or branch: + logger.debug("Attempting to Create Commit before doing an empty upload.") + create_commit_logic( + commit_sha, + parent_sha, + pull_request_number, + branch, + slug, + token, + git_service, + enterprise_url, + fail_on_error, + args, + ) logger.debug( "Starting empty upload process",