Skip to content

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.

readonly key: "coverage"

Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:4614

Identifies this provider as the coverage capability.

ProviderIdentity.key


readonly providerName: string

Defined in: cli/cli/src/plugin/capabilities/capabilities.type.ts:56

The provider’s name, e.g. github or vercel.

ProviderIdentity.providerName

optional checkRepo(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.

CoverageExpectations

Promise<CoverageRepoReport>


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.

Promise<CoverageTokenCheck>


optional configFiles(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.

CoverageConfigInput

Record<string, string>


optional statusContexts(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).

CoverageStatusInput

CoverageStatusContext[]


optional upload(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.

CoverageUploadInput

Promise<CoverageUploadResult>