Skip to content

fix: replace truncated git tree API with apis.json + Contents API for catalog#160

Merged
char0n merged 1 commit intomainfrom
fix/catalog-use-apis-json
Apr 2, 2026
Merged

fix: replace truncated git tree API with apis.json + Contents API for catalog#160
char0n merged 1 commit intomainfrom
fix/catalog-use-apis-json

Conversation

@char0n
Copy link
Copy Markdown
Member

@char0n char0n commented Apr 2, 2026

Summary

The GitHub recursive tree API truncates at ~100k entries, causing the catalog to drop from 5000+ to ~999 APIs and lose all umbrella vendor sub-APIs (googleapis.com/calendar, etc.) and all 380 workflows.

Fixes #157, closes #55.

Changes

Two targeted API calls replace the single truncated tree call:

  1. APIs: Fetch curated apis.json index from jentic-public-apis — 1 HTTP request → 1079 deduplicated APIs including all Google, Atlassian, etc. sub-APIs
  2. Workflows: Fetch workflows/ directory via GitHub Contents API — 1 HTTP request → 380 workflows

Removed dead code: _fetch_full_tree, _build_api_manifest_from_tree, _build_manifest_shallow, _build_workflow_manifest_from_tree, _VERSION_BRANCH_RE.

Net: -70 lines (71 added, 141 removed).

Limitations

apis.json is a curated index with 1079 APIs. The full repo has 5000+ API directories. APIs not yet added to the index won't appear in the catalog. This covers all major APIs and is maintained upstream.

Test results

Metric Before (tree API) After
API entries 999 (truncated) 1079
Workflow entries 0 (truncated) 380
Google Calendar Missing Present
HTTP requests 1 (truncated) 2

🤖 Generated with Claude Code

@char0n char0n self-assigned this Apr 2, 2026
@char0n char0n added the bug Something isn't working label Apr 2, 2026
@char0n char0n requested a review from Copilot April 2, 2026 19:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes catalog truncation caused by GitHub’s recursive git tree API limit by switching manifest generation to a curated apis.json index plus a single GitHub Contents API call for workflows/, restoring missing umbrella vendor sub-APIs and workflow sources.

Changes:

  • Build the API manifest from apis/openapi/apis.json (raw GitHub URL) instead of the recursive tree API.
  • Build the workflow manifest by listing workflows/ via the GitHub Contents API.
  • Remove tree-based manifest builders and related fallback logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@char0n char0n force-pushed the fix/catalog-use-apis-json branch from 7baea88 to 7121e48 Compare April 2, 2026 20:05
@char0n char0n requested a review from Copilot April 2, 2026 20:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… catalog

The GitHub recursive tree API truncates at ~100k entries, causing the
catalog to drop from 5000+ to ~999 APIs and lose all umbrella vendor
sub-APIs (googleapis.com/calendar, etc.) and all 380 workflows.

Now uses two targeted API calls instead:
- APIs: fetch curated apis.json index file (1 request → 1079 APIs)
- Workflows: fetch workflows/ directory via Contents API (1 request → 380 workflows)

Removes dead code: _fetch_full_tree, _build_api_manifest_from_tree,
_build_manifest_shallow, _build_workflow_manifest_from_tree.

Fixes #157

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@char0n char0n force-pushed the fix/catalog-use-apis-json branch from 7121e48 to 4d6cfb9 Compare April 2, 2026 20:19
@char0n char0n merged commit 9f15625 into main Apr 2, 2026
4 checks passed
@char0n char0n deleted the fix/catalog-use-apis-json branch April 2, 2026 20:31
github-actions bot pushed a commit that referenced this pull request Apr 2, 2026
## [0.5.3](v0.5.2...v0.5.3) (2026-04-02)

### Bug Fixes

* replace truncated git tree API with apis.json + Contents API for workflows catalog ([#160](#160)) ([9f15625](9f15625)), closes [#157](#157)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants