mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-04 02:58:10 +10:00
* Add preflight * fix syntax * move check * get event * print * return event * use path * tt * move to helper * add issue_comment * remove should run * check owner * add more information to the logs * test * add finished * move keys * Update errors * remove repo * fix JQ run * filter
23 lines
599 B
Python
23 lines
599 B
Python
import asyncio
|
|
import os
|
|
|
|
from scripts.changed.repo import get_repo
|
|
from scripts.helpers.event import get_event
|
|
|
|
|
|
async def check():
|
|
print("Information: https://hacs.xyz/docs/publish/include#check-owner")
|
|
repo = get_repo()
|
|
event = get_event()
|
|
actor = event["pull_request"]["user"]["login"]
|
|
|
|
if repo.split("/")[0] == event["pull_request"]["user"]["login"]:
|
|
print(f"{actor} is the owner of the repository")
|
|
return
|
|
|
|
print(f"::warning::{actor} is the owner of the repository")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.get_event_loop().run_until_complete(check())
|