Files
default/scripts/check/repository.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

37 lines
837 B
Python

import asyncio
import json
import os
from glob import glob
from aiogithubapi import GitHub
from scripts.changed.repo import get_repo
TOKEN = os.getenv("GITHUB_TOKEN")
async def check():
repo = get_repo()
issues = []
async with GitHub(TOKEN) as github:
repository = await github.get_repo(repo)
repo = repository.attributes
if not repo["has_issues"]:
issues.append("Issues not enabled.")
if not repo["description"]:
issues.append("No description. (https://hacs.xyz/docs/publish/start#description)")
if not repo["topics"]:
issues.append("No topics. (https://hacs.xyz/docs/publish/start#topics)")
if issues:
for issue in issues:
print(issue)
exit(1)
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(check())