2021-11-04 05:01:35 +00:00
|
|
|
from ghub import GHub
|
|
|
|
from rich.prompt import Prompt
|
|
|
|
from rich import print
|
2021-11-04 02:26:39 +00:00
|
|
|
import httpx
|
2021-11-05 02:59:03 +00:00
|
|
|
import os
|
2021-11-04 02:26:39 +00:00
|
|
|
|
|
|
|
|
2021-11-04 05:01:35 +00:00
|
|
|
def main():
|
2021-11-05 02:59:03 +00:00
|
|
|
if not os.environ.get("GITHUB_TOKEN"):
|
|
|
|
raise Exception("Please set GITHUB_TOKEN")
|
2021-11-04 05:01:35 +00:00
|
|
|
user_name = Prompt.ask("Username?")
|
|
|
|
gh = GHub()
|
2021-11-05 01:48:38 +00:00
|
|
|
success = gh.load_user(user_name=user_name)
|
|
|
|
if success:
|
|
|
|
print(gh.repos_table())
|
2021-11-04 02:26:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|