Skip to content

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

feat: add workflow to sync docs guides on SDK source changes

Sushmitha Mallesh9aa5ac0b9442
diff --git a/.github/workflows/docs.sdk-change-sync.yml b/.github/workflows/docs.sdk-change-sync.yml
new file mode 100644
index 000000000..5c9d556df
--- /dev/null
+++ b/.github/workflows/docs.sdk-change-sync.yml
@@ -0,0 +1,96 @@
+name: Docs - Sync guides on SDK changes
+
+on:
+ push:
+ branches: [next]
+ paths:
+ - 'ts/packages/core/src/**'
+ - 'ts/packages/cli/src/**'
+ - 'ts/packages/providers/*/src/**'
+ - 'python/composio/**'
+
+jobs:
+ sync-docs:
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ permissions:
+ contents: write
+ pull-requests: write
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 2
+
+ - name: Get SDK diff
+ id: diff
+ run: |
+ DIFF=$(git diff HEAD~1 -- \
+ ts/packages/core/src/ \
+ ts/packages/cli/src/ \
+ ts/packages/providers/*/src/ \
+ python/composio/)
+
+ if [ -z "$DIFF" ]; then
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ echo "$DIFF" > /tmp/sdk-diff.patch
+ echo "$(echo "$DIFF" | wc -l) lines of SDK changes"
+ fi
+
+ - name: Check docs for staleness
+ if: steps.diff.outputs.has_changes == 'true'
+ uses: anthropics/claude-code-action@v1
+ with:
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
+ prompt: |
+ SDK source code was just updated. Check if any documentation needs to change.
+
+ 1. Read the SDK diff at /tmp/sdk-diff.patch to understand what changed
+ 2. Focus on user-facing changes: new/renamed/removed methods, changed parameters, new features, changed behavior. Skip internal refactors, test changes, and type-only changes.
+ 3. If there are user-facing changes, search docs/content/docs/ for pages that reference the affected APIs, patterns, or features
+ 4. Update any docs that would be stale or incorrect after this SDK change — guides, FAQs, examples, quickstart, etc.
+ 5. Do NOT touch docs/content/reference/ (those are auto-generated separately)
+ 6. Do NOT touch docs/content/changelog/ (changelogs are written separately)
+ 7. If no docs changes are needed, make no file changes
+
+ - name: Create PR if changed
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ if [ -z "$(git status --porcelain)" ]; then
+ echo "No documentation changes needed"
+ exit 0
+ fi
+
+ BRANCH="docs/sdk-sync-${GITHUB_SHA::7}"
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git checkout -b "$BRANCH"
+ git add -A
+ git commit -m "docs: update guides for SDK changes"
+ git push -u origin "$BRANCH"
+
+ gh pr create \
+ --base next \
+ --head "$BRANCH" \
+ --title "docs: update guides for SDK changes" \
+ --body "$(cat <<'EOF'
+ ## Summary
+ Automated docs update triggered by SDK source changes on `next`.
+
+ Claude reviewed the SDK diff and updated guides, FAQs, or examples
+ that reference changed APIs or features.
+
+ ## Review checklist
+ - [ ] Changes accurately reflect the new SDK behavior
+ - [ ] No unrelated docs were modified
+ - [ ] Code examples are correct and complete
+
+ Generated by Claude Code via GitHub Actions.
+ EOF
+ )"