26 lines
444 B
Python
26 lines
444 B
Python
"""GitMon"""
|
|
from loguru import logger
|
|
from gitmon.api import GitHubApi
|
|
|
|
|
|
def print_event(event):
|
|
event_type = event.get('type')
|
|
repo = event.get('repo')
|
|
actor = event.get('actor')
|
|
|
|
print(f'{event_type}:\t{repo["name"]}, {actor["login"]}')
|
|
|
|
|
|
def main():
|
|
"""Main entry point."""
|
|
|
|
api = GitHubApi()
|
|
|
|
events = api.get_events()
|
|
for event in events:
|
|
print_event(event)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|