mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +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",
|
"documentation": "https://www.home-assistant.io/integrations/directv",
|
||||||
"requirements": ["directv==0.4.0"],
|
"requirements": ["directv==0.4.0"],
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"quality_scale": "gold",
|
"quality_scale": "silver",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/homematicip_cloud",
|
"documentation": "https://www.home-assistant.io/integrations/homematicip_cloud",
|
||||||
"requirements": ["homematicip==1.0.13"],
|
"requirements": ["homematicip==1.0.13"],
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "silver",
|
||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"loggers": ["homematicip"]
|
"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)}"
|
"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")
|
integration.add_error("manifest", "Domain does not match dir name")
|
||||||
|
|
||||||
if (
|
if not integration.core and (core_components_dir / domain).exists():
|
||||||
not integration.core
|
|
||||||
and (core_components_dir / integration.manifest["domain"]).exists()
|
|
||||||
):
|
|
||||||
integration.add_warning(
|
integration.add_warning(
|
||||||
"manifest", "Domain collides with built-in core integration"
|
"manifest", "Domain collides with built-in core integration"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if domain in NO_IOT_CLASS and "iot_class" in integration.manifest:
|
||||||
integration.manifest["domain"] in NO_IOT_CLASS
|
|
||||||
and "iot_class" in integration.manifest
|
|
||||||
):
|
|
||||||
integration.add_error("manifest", "Domain should not have an IoT Class")
|
integration.add_error("manifest", "Domain should not have an IoT Class")
|
||||||
|
|
||||||
if (
|
if (
|
||||||
integration.manifest["domain"] not in NO_IOT_CLASS
|
domain not in NO_IOT_CLASS
|
||||||
and "iot_class" not in integration.manifest
|
and "iot_class" not in integration.manifest
|
||||||
and integration.manifest.get("integration_type") != "virtual"
|
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",
|
"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:
|
if not integration.core:
|
||||||
validate_version(integration)
|
validate_version(integration)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user