mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-22 02:32:13 +10:00
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
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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())
|
||||
Reference in New Issue
Block a user