Revert "Remove hacf-fr" (#860)

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
This commit is contained in:
epenet
2021-03-21 14:47:03 +01:00
committed by GitHub
co-authored by Joakim Sørensen
parent 250b8c9cb7
commit 6ff8d29e5c
4 changed files with 2 additions and 17 deletions
+1 -10
View File
@@ -7,21 +7,13 @@ from aiogithubapi import GitHub, AIOGitHubAPIException
TOKEN = os.getenv("GITHUB_TOKEN")
BLOCKED_OWNERS = ["hacf-fr"]
async def check():
print("Information: https://hacs.xyz/docs/publish/include#check-owner")
repo = get_repo()
repo_owner = repo.split("/")[0]
event = get_event()
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():
print(f"'{actor}' is the owner of '{repo}'")
return
@@ -29,8 +21,7 @@ async def check():
try:
async with GitHub(TOKEN) as github:
request = await github.client.get(
f"/repos/{repo}/contributors",
headers={},
f"/repos/{repo}/contributors", headers={},
)
contributors = [
{"login": x["login"], "contributions": x["contributions"]}