mirror of
https://git.juggalol.com/agatha/gitmon.git
synced 2024-12-26 23:56:39 +00:00
Colorize DeleteEvents for console watching
This commit is contained in:
parent
2d7fad2075
commit
bb1ba3997f
7
main.py
7
main.py
@ -12,7 +12,10 @@ def log_event(event):
|
||||
repo = event.get('repo')
|
||||
actor = event.get('actor')
|
||||
|
||||
logger.info(f'{event_type}:\t{repo["name"]}, {actor["login"]}')
|
||||
if event_type == 'DeleteEvent':
|
||||
logger.error(f'{event_type}:\t{repo["name"]}, {actor["login"]}')
|
||||
else:
|
||||
logger.info(f'{event_type}:\t{repo["name"]}, {actor["login"]}')
|
||||
|
||||
|
||||
def main():
|
||||
@ -26,7 +29,7 @@ def main():
|
||||
if event['type'] in ['CreateEvent', 'DeleteEvent']:
|
||||
log_event(event)
|
||||
|
||||
time.sleep(10)
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user