LibreTube/.github/checkrun.py

16 lines
338 B
Python
Raw Normal View History

2022-06-18 20:34:35 +05:30
from json import load
from os import system
f = open('commit.json')
data = load(f)
f.close()
2022-09-18 14:28:54 +05:30
data = data['commit']['message']
2022-06-18 20:34:35 +05:30
2022-09-18 14:32:02 +05:30
if "\n\n" in data:
if data.split("\n\n",1)[-1].split()[0] == "[SILENT]":
system('killall -9 python')
2022-06-21 11:45:36 +05:30
else:
print("Silence not found")
else:
2022-09-18 10:47:24 +05:30
print("Empty Description")