@devries-cameron20 / composio-1 / commits / 87464bf2a
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): use staging endpoints for data sync (#3591)

This PR: - configures `docs-update-data.yml` to source docs data from `COMPOSIO_BASE_URL_STAGING` - fails fast when the staging base URL is missing or does not include `/api/v3` - derives v3 and v3.1 OpenAPI URLs from the staging secret so the job does not fall back to production - updates the generated data-sync PR copy to say OpenAPI specs are fetched from staging - quotes `$GITHUB_OUTPUT` redirects so `actionlint` stays clean - verified with `go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/docs-update-data.yml`, `git diff --check`, and shell endpoint derivation checks

Alberto Schiabel committed Jun 17, 2026 at 17:46 UTC 87464bf2ad8df70cc37ec857452f5f4ecdfa37f7
1 file changed +29 -3
.github/workflows/docs-update-data.yml
+29 -3
@@ -39,6 +39,32 @@ jobs:
39 - name: Setup Node.js, pnpm, Bun
40 uses: ./.github/actions/setup-node-pnpm-bun
41
42 + - name: Configure staging API endpoints
43 + env:
44 + COMPOSIO_BASE_URL_STAGING: ${{ secrets.COMPOSIO_BASE_URL_STAGING }}
45 + run: |
46 + staging_v3_base="${COMPOSIO_BASE_URL_STAGING%/}"
47 +
48 + if [ -z "$staging_v3_base" ]; then
49 + echo "::error::COMPOSIO_BASE_URL_STAGING is not set"
50 + exit 1
51 + fi
52 +
53 + if [[ "$staging_v3_base" != */api/v3 ]]; then
54 + echo "::error::COMPOSIO_BASE_URL_STAGING must include the /api/v3 path"
55 + exit 1
56 + fi
57 +
58 + staging_v31_base="${staging_v3_base%/api/v3}/api/v3.1"
59 +
60 + {
61 + echo "COMPOSIO_API_BASE=$staging_v3_base"
62 + echo "OPENAPI_SPEC_URL=$staging_v3_base/openapi.json"
63 + echo "OPENAPI_V31_SPEC_URL=$staging_v31_base/openapi.json"
64 + } >> "$GITHUB_ENV"
65 +
66 + echo "Configured staging API endpoints"
67 +
68 - name: Install dependencies
69 run: bun install
70
@@ -60,10 +86,10 @@ jobs:
86 cd ..
87 git add -N docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
88 if git diff --quiet docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null; then
63 - echo "has_changes=false" >> $GITHUB_OUTPUT
89 + echo "has_changes=false" >> "$GITHUB_OUTPUT"
90 echo "No changes detected"
91 else
66 - echo "has_changes=true" >> $GITHUB_OUTPUT
92 + echo "has_changes=true" >> "$GITHUB_OUTPUT"
93 echo "Changes detected:"
94 git diff --stat docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
95 fi
@@ -81,7 +107,7 @@ jobs:
107
108 ## What changed
109 - **Toolkit catalog** (`docs/public/data/toolkits.json`, `toolkits-list.json`) — refreshed list of available toolkits, auth schemes, and tools from the backend API
84 - - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`) — latest v3.1 and v3.0 API specifications fetched from production
110 + - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`) — latest v3.1 and v3.0 API specifications fetched from staging
111 - **API reference pages** (`docs/content/reference/api-reference/`, `docs/content/reference/v3/api-reference/`) — regenerated index pages for both API versions
112 - **Meta tools reference** (`docs/public/data/meta-tools.json`, `docs/content/reference/meta-tools/*.mdx`) — updated meta tool schemas and reference docs
113 branch: docs/auto-update-data