From 7af494e7e7e8ddbe2fec96ff897ba2fb3e329b9e Mon Sep 17 00:00:00 2001 From: bbhtt Date: Wed, 18 Sep 2024 21:25:53 +0530 Subject: [PATCH] Revert "gh-ls-org: Don't process untouched repos" This reverts commit 1a30993f2917e30860f0c6fcde81508d2fae99e0. This hits API limit too frequently --- .../flatpak-external-data-checker/gh-ls-org | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/.github/actions/flatpak-external-data-checker/gh-ls-org b/.github/actions/flatpak-external-data-checker/gh-ls-org index aa1b879..d23a693 100755 --- a/.github/actions/flatpak-external-data-checker/gh-ls-org +++ b/.github/actions/flatpak-external-data-checker/gh-ls-org @@ -1,11 +1,9 @@ #!/usr/bin/python3 import argparse -import datetime import os import github -from github.GithubException import GithubException if __name__ == "__main__": usage = ( @@ -16,10 +14,6 @@ if __name__ == "__main__": parser.add_argument("organization", help="name of github organization") args = parser.parse_args() - earliest = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta( - weeks=5 - ) - github_token = os.environ["GITHUB_TOKEN"] g = github.Github(github_token, per_page=200) @@ -27,24 +21,4 @@ if __name__ == "__main__": for repo in org.get_repos(): if not repo.archived: - try: - default_branch = repo.default_branch - branch = repo.get_branch(default_branch) - last_commit = repo.get_commit(branch.commit.sha) - last_commit_time = last_commit.commit.committer.date.astimezone( - datetime.timezone.utc - ) - pr_count = [ - pr - for pr in repo.get_pulls(state="open") - if pr.user.login == "flathubbot" - ] - except GithubException: - pr_count = [] - last_commit_time = datetime.datetime.now( - datetime.timezone.utc - ) + datetime.timedelta(seconds=10) - pass - if len(pr_count) >= 10 and last_commit_time < earliest: - continue print(repo.html_url)