Add edits check (#862)

This commit is contained in:
Joakim Sørensen
2021-03-13 15:00:23 +01:00
committed by GitHub
parent f35cf1f316
commit 3b1e9c241a
2 changed files with 29 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import asyncio
from scripts.helpers.event import get_event
async def check():
event = get_event()
pull_request = event["pull_request"]
if not pull_request["maintainer_can_modify"]:
if pull_request["head"]["repo"]["full_name"] != "hacs/default":
exit("::error::The PR is not editable by HACS maintainers")
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(check())