mirror of
https://git.juggalol.com/agatha/gitmon.git
synced 2024-11-22 15:36:43 +00:00
Colorize DeleteEvents for console watching
This commit is contained in:
parent
2d7fad2075
commit
bb1ba3997f
5
main.py
5
main.py
@ -12,6 +12,9 @@ def log_event(event):
|
||||
repo = event.get('repo')
|
||||
actor = event.get('actor')
|
||||
|
||||
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"]}')
|
||||
|
||||
|
||||
@ -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