Last active
May 19, 2021 16:06
-
-
Save soda480/a1d5cdf3f303a2625fd1e924a546ee76 to your computer and use it in GitHub Desktop.
Get number of repositories by topic in an organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python - << EOF | |
| from github3api import GitHubAPI | |
| client = GitHubAPI.get_client() | |
| topics = [ | |
| '--topic-goes-here--', | |
| '--topic-goes-here--', | |
| '--topic-goes-here--' | |
| ] | |
| org = '--organization-goes-here--' | |
| for topic in topics: | |
| result = client.get(f'/search/repositories?q=topic:{topic}+org:{org}') | |
| print(f"{topic}:{result['total_count']}") | |
| EOF |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script above can be executed within a Docker container, like this: