Skip to content

doctor repo

Terminal window
holocron doctor repo

Compares what holocron setup writes to the repository with what the source provider reports now, and prints one row per group. It changes nothing and exits non-zero while any row fails.

Run it after setup to see whether the repository still matches the config, or before it to see what setup would change. Variables, secrets and environments have their own checks: doctor secrets (secrets and Actions variables).

✓ description and homepage match 2 of 2 match
✗ topics match 2 problem(s)
- missing topic automation
- unexpected topic cli
✓ labels match 18 of 18 match
· branch protection matches rulesets are not available on this plan (classic branch protection is not read)
✓ security settings match 6 of 6 match
3 ok, 1 fail, 1 skipped

A row appears only when the config declares that group. Labels and the security settings are always written by setup, so they are always checked.

Row Declared by A problem is
description and homepage description, homepage a value that differs or is unset
default branch and settings repo.defaultBranch; the merge and feature settings setup applies with a repo.protection preset a setting that differs
topics repo.topics a missing topic, or one not declared (setup replaces the whole set)
custom properties repo.properties, and the protection level setup stamps for a preset a value that differs or is unset. The properties setup derives (profile, stack, capabilities) are not compared with the repository; the capabilities are checked against the organization’s definition in the next row
custom property values the capabilities this config wires (holocron_capabilities) and the values repo.properties declares a value the organization’s custom property definition does not allow, found before setup is refused with a 422; skipped when the token cannot read the organization’s definitions
capability property every capability the CLI defines against the organization’s holocron_capabilities property a capability the property does not allow yet, found before any repo that wires it is refused with a 422; fix it with apply properties; skipped when the token cannot read the definition
labels the canonical labels a label that is missing, whose colour or description differs, or one of the stale labels setup deletes
area labels repo.labels.areas a declared area with no area:<name> label (setup makes it); an area: label nobody declared is only an info note on the row, never a failure
issue views repo.views, one repo-views:<slug> row each, through the optional Source.countIssues only a filter GitHub’s search refuses (422). Every other row is ok with an info note: the issues the filter matches today, the settings to fill in (icon, colour, visibility, description), a reminder that GitHub has no API for saved views, so whether a view is saved is not checked, and last the link that opens the search; skipped when the provider cannot count issues
issue Types the org area’s issueTypes, read through the issues provider (organization Issue types: read) a declared Type the organization lacks (holocron apply issue-types or setup makes it); a different description or colour (was and declared), a Type turned off and a Type nobody declared are info notes, never failures; skipped when nothing is declared, the provider has no listTypes or the token cannot read the list
team access repo.teams a team without access, or with another permission (a bare slug means push)
branch protection repo.protection (balanced or strict) the holocron-default-branch ruleset is missing, not active, lacks a rule, or its required status checks differ from the ones requiredChecks() derives: one the ruleset lacks is missing required check, one it requires that nothing derives is stale context
ci check pin (strict only) ci.pin (integrationId of the App that may post ci / Required checks) the ruleset does not hold the declared pin, pins another App, or pins one the config does not declare. With ci.pin unset and no pin in the ruleset the row is skipped and says the option is off (any App may satisfy the check)
security settings always: alerts, security updates, secret scanning, push protection, private reporting, CodeQL a feature that is off (CodeQL default setup is expected off when a scan:code task replaces it)

Something that exists but is not declared is not a problem, except where setup would remove it: an extra topic, a stale label, an extra rule in the ruleset or a stale required context (one requiredChecks() no longer derives, such as a per-task context after the switch to the ci / Required checks aggregate).

Not compared: GitHub Pages, CODEOWNERS and the generated files (holocron probe generated check covers those), the dependency graph (GitHub has no read for it), and classic branch protection.

A row is a skip, not a failure, when it cannot be read: no source provider is configured or it could not load, the provider lacks the read method for that group, the token is missing, the plan has no rulesets API (403), or the provider reports none of the security settings.

A row fails when something differs and when the provider reports an error for that group.

When repo.teams is set, a team that has access to the repository but is not listed there is added to the team access row as an information note (info: 2 team(s) with access not in repo.teams: ...); it never fails the row. A team that has access on purpose (an organization-wide one) goes in doctor.manualTeams (slugs only, case ignored):

doctor: { manualTeams: ["org-wide"] },

A repository that sets no repo.teams has no team access row and nothing is said about its teams.

The reads use the same token as setup: github.admin for the repository, rulesets and security settings, and github.org for the teams when set. Security settings GitHub does not report to the token are left out of the comparison rather than counted as off.

Related: doctor, setup, doctor secrets.