periodic push

This commit is contained in:
2023-06-29 16:14:36 +02:00
parent c948b95622
commit 831f676068
267 changed files with 17705 additions and 10864 deletions

View File

@@ -157,14 +157,19 @@ async def hacs_repositories_add(
if renamed := hacs.common.renamed_repositories.get(repository):
repository = renamed
if not hacs.repositories.get_by_full_name(repository):
if category not in hacs.common.categories:
hacs.log.error("%s is not a valid category for %s", category, repository)
elif not hacs.repositories.get_by_full_name(repository):
try:
await hacs.async_register_repository(
repository_full_name=repository,
category=category,
)
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
except (
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
) as exception:
hacs.async_dispatch(
HacsDispatchEvent.ERROR,
{
@@ -175,7 +180,6 @@ async def hacs_repositories_add(
)
else:
hacs.async_dispatch(
HacsDispatchEvent.ERROR,
{

View File

@@ -103,7 +103,7 @@ async def hacs_repository_ignore(
"""Ignore a repository."""
hacs: HacsBase = hass.data.get(DOMAIN)
repository = hacs.repositories.get_by_id(msg["repository"])
hacs.common.ignored_repositories.append(repository.data.full_name)
hacs.common.ignored_repositories.add(repository.data.full_name)
await hacs.data.async_write()
connection.send_message(websocket_api.result_message(msg["id"]))