mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add issue_tracker property to manifest (#35153)
This commit is contained in:
parent
4ae31bc938
commit
9983c43697
@ -243,6 +243,11 @@ class Integration:
|
||||
"""Return documentation."""
|
||||
return cast(str, self.manifest.get("documentation"))
|
||||
|
||||
@property
|
||||
def issue_tracker(self) -> Optional[str]:
|
||||
"""Return issue tracker link."""
|
||||
return cast(str, self.manifest.get("issue_tracker"))
|
||||
|
||||
@property
|
||||
def quality_scale(self) -> Optional[str]:
|
||||
"""Return Integration Quality Scale."""
|
||||
|
@ -21,7 +21,7 @@ def documentation_url(value: str) -> str:
|
||||
return value
|
||||
|
||||
parsed_url = urlparse(value)
|
||||
if not parsed_url.scheme == DOCUMENTATION_URL_SCHEMA:
|
||||
if parsed_url.scheme != DOCUMENTATION_URL_SCHEMA:
|
||||
raise vol.Invalid("Documentation url is not prefixed with https")
|
||||
if parsed_url.netloc == DOCUMENTATION_URL_HOST and not parsed_url.path.startswith(
|
||||
DOCUMENTATION_URL_PATH_PREFIX
|
||||
@ -46,6 +46,9 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Required("documentation"): vol.All(
|
||||
vol.Url(), documentation_url # pylint: disable=no-value-for-parameter
|
||||
),
|
||||
vol.Optional(
|
||||
"issue_tracker"
|
||||
): vol.Url(), # pylint: disable=no-value-for-parameter
|
||||
vol.Optional("quality_scale"): vol.In(SUPPORTED_QUALITY_SCALES),
|
||||
vol.Optional("requirements"): [str],
|
||||
vol.Optional("dependencies"): [str],
|
||||
|
Loading…
x
Reference in New Issue
Block a user