$ show maguowei/starred
This repository provides the `starred` Python CLI tool, which generates and maintains an Awesome-style Markdown list from a GitHub user's starred repositories. The tool queries the GitHub GraphQL API to fetch all starred repos (with pagination), groups them by programming language or repository topic, and outputs a formatted Markdown document. It can optionally sort categories alphabetically, filter by topic popularity, include private repositories, and directly push the generated file to a target GitHub repository using the GitHub REST API. The architecture is a simple single-command CLI with two source modules: `starred/starred.py` (Click CLI entry point and Markdown generation) and `starred/githubgql.py` (a self-contained GraphQL client for fetching starred repos). External dependencies include `click`, `requests`, `github3.py`, `gql`, and `aiohttp`. The code is clean, follows a straightforward functional design, and integrates well with GitHub's APIs. While it lacks unit tests, the CI runs an integration test against the real GitHub API.
The LLM identified 1 files worth highlighting for reuse:
Implements a GraphQL client class `GitHubGQL` that fetches all starred repositories for a given GitHub user via the GitHub GraphQL API with recursive pagination (100 per page). It defines a self-contained `Repository` data class. The client is isolated (imports only `gql` and `aiohttp`), handles pagination correctly, and can be reused in any project needing to retrieve a complete list of a user's starred repos. The code demonstrates clean separation of concerns and non-trivial use of the `gql` library with async transport.