mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Downgrade integrations without code owner (#85752)
This commit is contained in:
parent
80714c544a
commit
e75c85f679
@ -4,7 +4,7 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/directv",
|
||||
"requirements": ["directv==0.4.0"],
|
||||
"codeowners": [],
|
||||
"quality_scale": "gold",
|
||||
"quality_scale": "silver",
|
||||
"config_flow": true,
|
||||
"ssdp": [
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/homematicip_cloud",
|
||||
"requirements": ["homematicip==1.0.13"],
|
||||
"codeowners": [],
|
||||
"quality_scale": "platinum",
|
||||
"quality_scale": "silver",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["homematicip"]
|
||||
}
|
||||
|
@ -309,25 +309,19 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
|
||||
"manifest", f"Invalid manifest: {humanize_error(integration.manifest, err)}"
|
||||
)
|
||||
|
||||
if integration.manifest["domain"] != integration.path.name:
|
||||
if (domain := integration.manifest["domain"]) != integration.path.name:
|
||||
integration.add_error("manifest", "Domain does not match dir name")
|
||||
|
||||
if (
|
||||
not integration.core
|
||||
and (core_components_dir / integration.manifest["domain"]).exists()
|
||||
):
|
||||
if not integration.core and (core_components_dir / domain).exists():
|
||||
integration.add_warning(
|
||||
"manifest", "Domain collides with built-in core integration"
|
||||
)
|
||||
|
||||
if (
|
||||
integration.manifest["domain"] in NO_IOT_CLASS
|
||||
and "iot_class" in integration.manifest
|
||||
):
|
||||
if domain in NO_IOT_CLASS and "iot_class" in integration.manifest:
|
||||
integration.add_error("manifest", "Domain should not have an IoT Class")
|
||||
|
||||
if (
|
||||
integration.manifest["domain"] not in NO_IOT_CLASS
|
||||
domain not in NO_IOT_CLASS
|
||||
and "iot_class" not in integration.manifest
|
||||
and integration.manifest.get("integration_type") != "virtual"
|
||||
):
|
||||
@ -343,6 +337,15 @@ def validate_manifest(integration: Integration, core_components_dir: Path) -> No
|
||||
"Virtual integration points to non-existing supported_by integration",
|
||||
)
|
||||
|
||||
if (quality_scale := integration.manifest.get("quality_scale")) in {
|
||||
"gold",
|
||||
"platinum",
|
||||
} and not integration.manifest.get("codeowners"):
|
||||
integration.add_error(
|
||||
"manifest",
|
||||
f"{quality_scale} integration does not have a code owner",
|
||||
)
|
||||
|
||||
if not integration.core:
|
||||
validate_version(integration)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user