Remove hacf-fr

This commit is contained in:
Ludeeus
2021-03-10 11:15:44 +00:00
parent 6cf19e8741
commit b8da843f00
4 changed files with 17 additions and 2 deletions
+1
View File
@@ -64,6 +64,7 @@
"enriqg9/dual-thermostat", "enriqg9/dual-thermostat",
"fineemb/lynk-co", "fineemb/lynk-co",
"futuretense/lock-manager", "futuretense/lock-manager",
"hacf-fr/hassRenaultZE",
"heinoldenhuis/home_assistant_area_waste", "heinoldenhuis/home_assistant_area_waste",
"home-assistant-community-themes/template", "home-assistant-community-themes/template",
"home-assistant-community-themes/theme-request", "home-assistant-community-themes/theme-request",
-1
View File
@@ -214,7 +214,6 @@
"gregoryduckworth/GoogleGeocode-HASS", "gregoryduckworth/GoogleGeocode-HASS",
"GuySie/ha-meural", "GuySie/ha-meural",
"ha0y/xiaomi_miot_raw", "ha0y/xiaomi_miot_raw",
"hacf-fr/hassRenaultZE",
"hcoohb/hass-yeelightbt", "hcoohb/hass-yeelightbt",
"heinoldenhuis/home_assistant_omnik_solar", "heinoldenhuis/home_assistant_omnik_solar",
"Hellowlol/ha-tide", "Hellowlol/ha-tide",
+6
View File
@@ -453,5 +453,11 @@
"reason": "Added to Home Assistant Core", "reason": "Added to Home Assistant Core",
"removal_type": "removal", "removal_type": "removal",
"link": "https://github.com/hacs/default/pull/841" "link": "https://github.com/hacs/default/pull/841"
},
{
"repository": "hacf-fr/hassRenaultZE",
"reason": "Repository is deleted",
"removal_type": "remove",
"link": "https://community.home-assistant.io/t/error-on-hacs-with-renaut-zoe/288712"
} }
] ]
+10 -1
View File
@@ -7,13 +7,21 @@ from aiogithubapi import GitHub, AIOGitHubAPIException
TOKEN = os.getenv("GITHUB_TOKEN") TOKEN = os.getenv("GITHUB_TOKEN")
BLOCKED_OWNERS = ["hacf-fr"]
async def check(): async def check():
print("Information: https://hacs.xyz/docs/publish/include#check-owner") print("Information: https://hacs.xyz/docs/publish/include#check-owner")
repo = get_repo() repo = get_repo()
repo_owner = repo.split("/")[0]
event = get_event() event = get_event()
actor = event["pull_request"]["user"]["login"] actor = event["pull_request"]["user"]["login"]
if repo_owner in BLOCKED_OWNERS:
exit(
f"::error::'{repo_owner}' is not allowed for submission, https://hacs.xyz/docs/publish/remove"
)
if repo.split("/")[0].lower() == actor.lower(): if repo.split("/")[0].lower() == actor.lower():
print(f"'{actor}' is the owner of '{repo}'") print(f"'{actor}' is the owner of '{repo}'")
return return
@@ -21,7 +29,8 @@ async def check():
try: try:
async with GitHub(TOKEN) as github: async with GitHub(TOKEN) as github:
request = await github.client.get( request = await github.client.get(
f"/repos/{repo}/contributors", headers={}, f"/repos/{repo}/contributors",
headers={},
) )
contributors = [ contributors = [
{"login": x["login"], "contributions": x["contributions"]} {"login": x["login"], "contributions": x["contributions"]}