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

Commit 5705444

Browse files
committed
Support custom upload name
1 parent 7b29277 commit 5705444

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

codecov/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def main(*argv, **kwargs):
205205
basics.add_argument('--flags', '-F', nargs="*", default=None, help="Flag these uploaded files with custom labels")
206206
basics.add_argument('--env', '-e', nargs="*", default=None, help="Store environment variables to help distinguish CI builds.")
207207
basics.add_argument('--required', action="store_true", default=False, help="If Codecov fails it will exit 1: failing the CI build.")
208+
basics.add_argument('--name', '-n', default=None, help="Custom defined name of the upload. Visible in Codecov UI.")
208209

209210
gcov = parser.add_argument_group('======================== gcov ========================')
210211
gcov.add_argument('--gcov-root', default=None, help="Project root directory when preparing gcov")
@@ -508,6 +509,9 @@ def main(*argv, **kwargs):
508509

509510
# Update Query
510511
# ------------
512+
if codecov.name:
513+
query['name'] = codecov.name
514+
511515
if codecov.flags:
512516
query['flags'] = ','.join(codecov.flags)
513517

0 commit comments

Comments
 (0)