A developer discovered that the `list_repos` function in their `my-git-manager` tool, which interacts with GitHub, does not behave as documented for certain sorting options. Specifically, when requesting repositories sorted by 'stars' or 'forks', the function defaults to fetching 100 repositories from GitHub's API, even if a smaller limit is specified. This occurs because GitHub's API only server-side sorts by 'created', 'updated', 'pushed', or 'full_name', requiring client-side sorting for 'stars' and 'forks'. The developer demonstrated this discrepancy through code examples, highlighting that the function returns the requested number of repositories but makes a much larger API call behind the scenes, which is not apparent to the user. AI
RANK_REASON Developer discovers a functional discrepancy in a personal tool's interaction with a platform API.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →