mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-16 18:44:58 +00:00
#743 - Trying to fix this.
This commit is contained in:
@@ -57,19 +57,13 @@ class HacsPlugin(HacsRepository):
|
||||
# Run common registration steps.
|
||||
await self.common_registration()
|
||||
|
||||
async def update_repository(self):
|
||||
async def update_repository(self, ignore_issues=False):
|
||||
"""Update."""
|
||||
if self.hacs.github.ratelimits.remaining == 0:
|
||||
return
|
||||
# Run common update steps.
|
||||
await self.common_update()
|
||||
await self.common_update(ignore_issues)
|
||||
|
||||
# Get plugin objects.
|
||||
find_file_name(self)
|
||||
|
||||
# Get JS type
|
||||
await self.parse_readme_for_jstype()
|
||||
|
||||
if self.content.path.remote is None:
|
||||
self.validate.errors.append("Repostitory structure not compliant")
|
||||
|
||||
@@ -86,25 +80,3 @@ class HacsPlugin(HacsRepository):
|
||||
self.data.authors = package["author"]
|
||||
except Exception: # pylint: disable=broad-except
|
||||
pass
|
||||
|
||||
async def parse_readme_for_jstype(self):
|
||||
"""Parse the readme looking for js type."""
|
||||
readme = None
|
||||
readme_files = ["readme", "readme.md"]
|
||||
root = await self.repository_object.get_contents("")
|
||||
for file in root:
|
||||
if file.name.lower() in readme_files:
|
||||
readme = await self.repository_object.get_contents(file.name)
|
||||
break
|
||||
|
||||
if readme is None:
|
||||
return
|
||||
|
||||
readme = readme.content
|
||||
for line in readme.splitlines():
|
||||
if "type: module" in line:
|
||||
self.information.javascript_type = "module"
|
||||
break
|
||||
elif "type: js" in line:
|
||||
self.information.javascript_type = "js"
|
||||
break
|
||||
|
Reference in New Issue
Block a user