Created
September 14, 2025 20:25
-
-
Save SollyBunny/770cdf3b6fb48f3f6aa0b10a522c1856 to your computer and use it in GitHub Desktop.
Get all repos with issues you have commented on
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
| #!/bin/env python3 | |
| import requests | |
| USERNAME = "SollyBunny" | |
| repos = set() | |
| page = 1 | |
| while True: | |
| url = f"https://api.github.com/search/issues?q=commenter:{USERNAME}&per_page=100&page={page}" | |
| r = requests.get(url).json() | |
| items = r.get("items", []) | |
| if not items: | |
| break | |
| for item in items: | |
| repos.add(item["repository_url"].split("/")[-2] + "/" + item["repository_url"].split("/")[-1]) | |
| page += 1 | |
| for repo in repos: | |
| print(repo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment