Files
default/scripts/check/manifest.py
T
Joakim Sørensen 001a81b77f New Github actions (#481)
* Test new check

* Add quote

* test

* test

* move check

* move back

* use env

* test multistep

* test trigger

* if: github.event.label.name

* quotes

* hassfest?

* Fix clone

* Update hassfest

* check hassfest

* Use real domain

* Lmit

* Test hassfest

* Check domain

* Fix domain

* No changes

* Enable on unlable

* Change HACS validate

* Move inputs

* Add dummy integration

* TEst

* Move to env

* Fix repo

* Remove entry
2020-05-26 17:53:04 +02:00

36 lines
824 B
Python

from scripts.changed.category import get_category
from scripts.helpers.manifest import get_manifest
def check():
if get_category() != "integration":
print("Only integrations are checked.")
return
manifest = get_manifest()
issues = []
if manifest.get("domain") is None:
issues.append("No domain")
if manifest.get("documentation") is None:
issues.append("No documentation")
if manifest.get("issue_tracker") is None:
issues.append("No issue_tracker")
if manifest.get("codeowners") is None:
issues.append("No codeowners")
if manifest.get("homeassistant"):
issues.append("homeassistant is not valid here")
if issues:
for issue in issues:
print(issue)
exit(1)
if __name__ == "__main__":
check()