diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb55e118..b0da70b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,8 +80,8 @@ jobs: - name: Dogfooding codecov-cli if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} run: | - codecovcli do-upload --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}} - codecovcli do-upload --report-type test_results --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}} + codecovcli -v do-upload --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}} + codecovcli do-upload --report-type test_results --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} --plugin pycoverage --flag python${{matrix.python-version}} static-analysis: runs-on: ubuntu-latest diff --git a/codecov_cli/commands/upload.py b/codecov_cli/commands/upload.py index aa9e7f75..377553c2 100644 --- a/codecov_cli/commands/upload.py +++ b/codecov_cli/commands/upload.py @@ -98,6 +98,8 @@ def _turn_env_vars_into_dict(ctx, params, value): "-n", "--name", help="Custom defined name of the upload. Visible in Codecov UI", + cls=CodecovOption, + fallback_field=FallbackFieldEnum.build_code, ), click.option( "-B", diff --git a/codecov_cli/fallbacks.py b/codecov_cli/fallbacks.py index d84c6eb6..2c8f9b33 100644 --- a/codecov_cli/fallbacks.py +++ b/codecov_cli/fallbacks.py @@ -5,15 +5,15 @@ class FallbackFieldEnum(Enum): - commit_sha = auto() - build_url = auto() + branch = auto() build_code = auto() + build_url = auto() + commit_sha = auto() + git_service = auto() job_code = auto() pull_request_number = auto() - slug = auto() - branch = auto() service = auto() - git_service = auto() + slug = auto() class CodecovOption(click.Option):