mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-04 02:58:10 +10:00
* Add preflight * fix syntax * move check * get event * print * return event * use path * tt * move to helper * add issue_comment * remove should run * check owner * add more information to the logs * test * add finished * move keys * Update errors * remove repo * fix JQ run * filter
27 lines
681 B
Python
27 lines
681 B
Python
from scripts.changed.category import get_category
|
|
from scripts.helpers.hacs_manifest import get_hacs_manifest
|
|
|
|
|
|
def check():
|
|
print("Information: https://hacs.xyz/docs/publish/include#check-hacs-manifest")
|
|
if get_category() != "integration":
|
|
print("Only integrations are checked.")
|
|
return
|
|
|
|
manifest = get_hacs_manifest()
|
|
fail = "::error::Missing required value for key '{key}' in {path}"
|
|
path = "hacs.json"
|
|
issues = []
|
|
|
|
if manifest.get("name") is None:
|
|
issues.append(fail.format(key="name", path=path))
|
|
|
|
if issues:
|
|
for issue in issues:
|
|
print(issue)
|
|
exit(1)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
check()
|