Skip to content

Commit 662064a

Browse files
Merge branch 'main' into joseph/fix
2 parents db39587 + 18f9d42 commit 662064a

32 files changed

Lines changed: 37 additions & 2607 deletions

README.md

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ CodecovCLI is a new way for users to interact with Codecov directly from the use
1717
- [create-commit](#create-commit)
1818
- [create-report](#create-report)
1919
- [do-upload](#do-upload)
20-
- [create-report-results](#create-report-results)
21-
- [get-report-results](#get-report-results)
2220
- [pr-base-picking](#pr-base-picking)
2321
- [send-notifications](#send-notifications)
2422
- [empty-upload](#empty-upload)
25-
- [How to Use Local Upload](#how-to-use-local-upload)
2623
- [Work in Progress Features](#work-in-progress-features)
2724
- [Plugin System](#plugin-system)
2825
- [Static Analysis](#static-analysis)
@@ -123,10 +120,8 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
123120
| `create-commit` | Saves the commit's metadata in codecov, it's only necessary to run this once per commit
124121
| `create-report` | Creates an empty report in codecov with initial data e.g. report name, report's commit
125122
| `do-upload` | Searches for and uploads coverage data to codecov
126-
| `create-report-results` | Used for local upload. It tells codecov that you finished local uploading and want it to calculate the results for you to get them locally.
127-
| `get-report-results` | Used for local upload. It asks codecov to provide you the report results you calculated with the previous command.
128123
| `pr-base-picking` | Tells codecov that you want to explicitly define a base for your PR
129-
| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previosly mentioned commands.
124+
| `upload-process` | A wrapper for 3 commands. Create-commit, create-report and do-upload. You can use this command to upload to codecov instead of using the previously mentioned commands.
130125
| `send-notifications` | A command that tells Codecov that you finished uploading and you want to be sent notifications. To disable automatically sent notifications please consider adding manual_trigger to your codecov.yml, so it will look like codecov: notify: manual_trigger: true.
131126
>**Note**: Every command has its own different options that will be mentioned later in this doc. Codecov will try to load these options from your CI environment variables, if not, it will try to load them from git, if not found, you may need to add them manually.
132127
@@ -156,7 +151,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
156151
|-r, --slug | owner/repo slug used instead of the private repo token in Self-hosted | Required
157152
|-t, --token | Codecov upload token | Required
158153
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
159-
|--code| The code of the report. This is used in local uploading to isolate local reports from regular or cloud reports uploaded to codecov so they don't get merged. It's basically a name you give to your report e.g. local-report. | Optional
160154
|-h, --help | Shows usage, and command options
161155

162156
## do-upload
@@ -165,7 +159,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
165159
| Option | Description | Usage
166160
| :---: | :---: | :---: |
167161
|-C, --sha, --commit-sha| Commit SHA (with 40 chars) | Required
168-
|--report-code | The code of the report defined when creating the report. If unsure, leave default | Optional
169162
|--network-root-folder | Root folder from which to consider paths on the network section default: (Current working directory) | Optional
170163
|-s, --dir, --coverage-files-search-root-folder | Folder where to search for coverage files default: (Current Working Directory) | Optional
171164
|--exclude, --coverage-files-search-exclude-folder | Folders to exclude from search | Optional
@@ -189,30 +182,6 @@ Codecov-cli supports user input. These inputs, along with their descriptions and
189182
|--git-service | Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Required
190183
|-h, --help | Shows usage, and command options
191184

192-
## create-report-results
193-
`codecovcli create-report-results [OPTIONS]`
194-
195-
| Option | Description | Usage
196-
| :---: | :---: | :---: |
197-
|--commit-sha | Commit SHA (with 40 chars) | Required
198-
|--code | The code of the report. If unsure, leave default | Required
199-
|--slug | owner/repo slug | Required
200-
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
201-
|-t, --token | Codecov upload token | Required
202-
|-h, --help | Shows usage, and command options
203-
204-
## get-report-results
205-
`codecovcli get-report-results [OPTIONS]`
206-
207-
| Option | Description | Usage
208-
| :---: | :---: | :---: |
209-
|--commit-sha | Commit SHA (with 40 chars) | Required
210-
|--code | The code of the report. If unsure, leave default | Required
211-
|--slug | owner/repo slug | Required
212-
|--git-service | Git provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional
213-
|-t, --token | Codecov upload token | Required
214-
|-h, --help | Shows usage, and command options
215-
216185
## pr-base-picking
217186
`codecovcli pr-base-picking [OPTIONS]`
218187

@@ -254,25 +223,6 @@ are ignored by codecov (including README and configuration files)
254223
| --git-service | Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server | Optional |
255224
| -h, --help | Show this message and exit. | Optional |
256225

257-
# How to Use Local Upload
258-
259-
The CLI also supports "dry run" local uploading. This is useful if you prefer to see Codecov status checks and coverage reporting locally, in your terminal, as opposed to opening a PR and waiting for your full CI to run. Local uploads do not interfere with regular uploads made from your CI for any given commit / Pull Request.
260-
261-
Local Upload is accomplished as follows:
262-
263-
```
264-
pip install codecov-cli
265-
codecovcli create-commit
266-
codecovcli create-report --code <CODE>
267-
codecovcli do-upload --report-code <CODE>
268-
codecovcli create-report-results --code <CODE>
269-
codecovcli get-report-results --code <CODE>
270-
```
271-
272-
Codecov will calculate the coverage results, and return them in your terminal, telling you whether your PR will fail or pass the coverage check.
273-
274-
Note: In order for Local Upload to work, it must be used against a commit on the origin repository. Local Upload does not work for arbitrary diffs or uncommitted changes on your local machine.
275-
276226
# Work in Progress Features
277227

278228
The following features are somewhat implemented in code, but are not yet meant for use. These features will be documented once they are fully implemented in the CLI.
@@ -281,10 +231,6 @@ The following features are somewhat implemented in code, but are not yet meant f
281231

282232
To provide extensibility to some of its commands, the CLI makes use of a plugin system. For most cases, the default commands are sufficient. But in some cases, having some custom logic specific to your use case can be beneficial. Note that full documentation of the plugin system is pending, as the feature is still heavily a work in progress.
283233

284-
## Static Analysis
285-
286-
The CLI can perform basic static analysis on Python code today. This static analysis is meant to power more future looking Codecov features and, as such, is not required or in active use today. As more functionality dependent on static analysis becomes available for use, we will document static analysis in detail here.
287-
288234
# Contributions
289235

290236
This repository, like all of Codecov's repositories, strives to follow our general [Contributing guidelines](https://github.com/codecov/contributing). If you're considering making a contribution to this repository, we encourage review of our Contributing guidelines first.

codecov_cli/commands/create_report_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logger = logging.getLogger("codecovcli")
1212

1313

14-
@click.command()
14+
@click.command(hidden=True, deprecated=True)
1515
@click.option(
1616
"--code", help="The code of the report. If unsure, leave default", default="default"
1717
)

codecov_cli/commands/get_report_results.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import click
44
import sentry_sdk
55

6-
from codecov_cli.fallbacks import CodecovOption, FallbackFieldEnum
76
from codecov_cli.helpers.args import get_cli_args
87
from codecov_cli.helpers.encoder import encode_slug
9-
from codecov_cli.helpers.git import GitService
108
from codecov_cli.helpers.options import global_options
119
from codecov_cli.services.report import send_reports_result_get_request
1210
from codecov_cli.types import CommandContext
@@ -15,7 +13,7 @@
1513
logger = logging.getLogger("codecovcli")
1614

1715

18-
@click.command()
16+
@click.command(hidden=True, deprecated=True)
1917
@click.option(
2018
"--code", help="The code of the report. If unsure, leave default", default="default"
2119
)

0 commit comments

Comments
 (0)