Skip to content

Scope integration discovery to custom_components#8967

Open
kingpanther13 wants to merge 1 commit into
hacs:masterfrom
kingpanther13:fix-integration-path-monorepo
Open

Scope integration discovery to custom_components#8967
kingpanther13 wants to merge 1 commit into
hacs:masterfrom
kingpanther13:fix-integration-path-monorepo

Conversation

@kingpanther13

Copy link
Copy Markdown

Proposed change

scripts/helpers/integration_path.py locates a submission's integration by
walking the entire clone for *manifest.json and exiting with "No manifest"
unless exactly one exists. The publishing documentation scopes the structure
rule to ROOT_OF_THE_REPO/custom_components/ ("there can only be one
subdirectory to ROOT_OF_THE_REPO/custom_components/"), so a repository that
satisfies the documented rule but also ships other legitimately-named
manifest.json files (a Supervisor add-on's inner component, test fixtures)
fails the Hassfest check before hassfest runs. Reproducer: #8966 - one
integration under custom_components/, plus add-on and fixture manifests
elsewhere; the HACS action itself passes on that repository.

This change scopes the search to ROOT/custom_components/ when that
directory exists and keeps the current whole-clone behavior otherwise
(content_in_root repositories are unaffected). Repositories with multiple
integrations under custom_components/ still fail exactly as today. Verified
against both shapes locally.

If the whole-clone uniqueness is intentional, happy to close this - guidance
on how monorepo-shaped repositories (integration + Supervisor add-on in one
repo) should submit would then be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant