Coverage
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4612
Code coverage reporting: what the coverage service says about the repository and the token that uploads to it.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlykey:"coverage"
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4614
Identifies this provider as the coverage capability.
Overrides
Section titled “Overrides”providerName
Section titled “providerName”
readonlyproviderName:string
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:56
The provider’s name, e.g. github or vercel.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”checkRepo()?
Section titled “checkRepo()?”
optionalcheckRepo(expected):Promise<CoverageRepoReport>
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4628
Compares the flags and components the repository’s config declares (holocron sync writes them to codecov.yml)
with what the service has for the repository, by name only. The caller passes the expected names, so the provider
never reads the config. A service may need a second credential for this read (Codecov’s API takes a personal token,
not the upload token): without it the report says so (checked: false) and nothing throws. Read-only.
Parameters
Section titled “Parameters”expected
Section titled “expected”Returns
Section titled “Returns”Promise<CoverageRepoReport>
checkToken()
Section titled “checkToken()”checkToken():
Promise<CoverageTokenCheck>
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4621
Asks the service whether it accepts the configured token for the repository, with names and statuses only, never the token. A service may hold several kinds of token (an upload token that its API does not take, an API token): the result says which question it could answer. An error that says nothing about the token (a network failure, a 5xx, a missing token) throws.
Returns
Section titled “Returns”Promise<CoverageTokenCheck>
configFiles()?
Section titled “configFiles()?”
optionalconfigFiles(input):Record<string,string>
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4650
The service’s own config files for the repository (Codecov: codecov.yml), as text by path relative to the
repository root, from the repo’s flags and components. A file that already exists comes in through
input.existing, so the provider can merge into it and keep every hand edit. Pure and offline: it reads and
writes nothing, so setup, sync and probe generated check can share it. The CLI writes the files (or compares
them with the committed copies); without a provider (or a provider without this method) it writes none.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Record<string, string>
statusContexts()?
Section titled “statusContexts()?”
optionalstatusContexts(input):CoverageStatusContext[]
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4642
The commit statuses the service posts on a pull request, so the code that decides which statuses the ci
aggregate and a ruleset wait on does not spell the service’s names. Pure and offline: names only, from the
components and the documentation mode the caller passes. The CLI hands the result to the task runner (which imports
no provider); without a provider, the task runner keeps its default (a context starting with codecov/ is a status).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”upload()?
Section titled “upload()?”
optionalupload(input):Promise<CoverageUploadResult>
Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4635
Uploads coverage reports to the service, one flag per group, authenticated the way the service allows from the job
it runs in (Codecov: the job’s OIDC token, so no stored secret). It reports names and counts only, never a token.
A group that has no report is skipped with a note; a failed upload is a failed group and stops the run. A setup
problem (no way to authenticate, a client that cannot be trusted) throws.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<CoverageUploadResult>