mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-18 03:15:45 +00:00
Updated HACS and also fixed Garadget #727
This commit is contained in:
5
config/custom_components/hacs/helpers/get_defaults.py
Executable file → Normal file
5
config/custom_components/hacs/helpers/get_defaults.py
Executable file → Normal file
@@ -2,6 +2,7 @@
|
||||
import json
|
||||
from aiogithubapi import AIOGitHub, AIOGitHubException
|
||||
from integrationhelper import Logger
|
||||
from custom_components.hacs.helpers.information import get_repository
|
||||
|
||||
|
||||
async def get_default_repos_orgs(github: type(AIOGitHub), category: str) -> dict:
|
||||
@@ -27,13 +28,13 @@ async def get_default_repos_orgs(github: type(AIOGitHub), category: str) -> dict
|
||||
return repositories
|
||||
|
||||
|
||||
async def get_default_repos_lists(github: type(AIOGitHub), default: str) -> dict:
|
||||
async def get_default_repos_lists(session, token, default: str) -> dict:
|
||||
"""Gets repositories from default list."""
|
||||
repositories = []
|
||||
logger = Logger("hacs")
|
||||
|
||||
try:
|
||||
repo = await github.get_repo("hacs/default")
|
||||
repo = await get_repository(session, token, "hacs/default")
|
||||
content = await repo.get_contents(default)
|
||||
repositories = json.loads(content.content)
|
||||
|
||||
|
Reference in New Issue
Block a user