From ce7b5fdc5dbb634196d898ff4d9d7ce2b2ea12e9 Mon Sep 17 00:00:00 2001 From: Christian Lempa Date: Tue, 13 Jun 2023 18:04:18 +0200 Subject: [PATCH] updates names --- raycast/check-repos-2.sh | 16 ------- ...ck-repos-3.py => repos-list-clcreative.py} | 0 raycast/test1.py | 47 +++++++++++++++++++ 3 files changed, 47 insertions(+), 16 deletions(-) delete mode 100755 raycast/check-repos-2.sh rename raycast/{check-repos-3.py => repos-list-clcreative.py} (100%) create mode 100755 raycast/test1.py diff --git a/raycast/check-repos-2.sh b/raycast/check-repos-2.sh deleted file mode 100755 index c582980..0000000 --- a/raycast/check-repos-2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Required parameters: -# @raycast.schemaVersion 1 -# @raycast.title Check Repos 2 -# @raycast.mode fullOutput - -# Optional parameters: -# @raycast.icon 🤖 - -# Documentation: -# @raycast.author ChristianLempa -# @raycast.authorURL https://raycast.com/ChristianLempa - -op run --env-file="/Users/xcad/.env" -- python3 /Users/xcad/Projects/christianlempa/scripts/repos check --list-orphaned - diff --git a/raycast/check-repos-3.py b/raycast/repos-list-clcreative.py similarity index 100% rename from raycast/check-repos-3.py rename to raycast/repos-list-clcreative.py diff --git a/raycast/test1.py b/raycast/test1.py new file mode 100755 index 0000000..132730a --- /dev/null +++ b/raycast/test1.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 + +# Required parameters: +# @raycast.schemaVersion 1 +# @raycast.title test1 +# @raycast.mode fullOutput + +# Optional parameters: +# @raycast.icon https://avatars.githubusercontent.com/u/97734037?s=200&v=4 + +# Documentation: +# @raycast.author ChristianLempa +# @raycast.authorURL https://raycast.com/ChristianLempa + +from dotenv import load_dotenv +import os +from repos import getRepos + + +load_dotenv() + +github_token = os.getenv("GITHUB_TOKEN") + +ignored_folders = [ + '.git', + '.DS_Store', + '.obsidian', +] + + +if __name__ == "__main__": + try: + # List all repos for an organization from GitHub + # https://docs.github.com/en/rest/reference/repos#list-organization-repositories + + repos = getRepos(github_token, 'clcreative') + if repos is not None: + for repo in repos: + print(f"{repo['name']}, {repo['owner']['login']}, {repo['description']}") + else: + raise Exception("repos is None") + + # Sum all repos + print(f"---\nTotal: {len(repos)}") + + except Exception as e: + print(f"error: {e}")