@devries-cameron20 / composio Mirror · read-only
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
yml 113 lines 4.5 KB
Raw
1 name: Docs - Sync Connect Clients
2
3 on:
4 repository_dispatch:
5 types: [dashboard-production-deploy]
6 workflow_dispatch:
7
8 permissions:
9 contents: read
10
11 jobs:
12 sync-clients:
13 runs-on: ubuntu-latest
14 timeout-minutes: 30
15 permissions:
16 contents: write
17 pull-requests: write
18 id-token: write
19
20 steps:
21 # See docs.changelog-to-docs.yml: `GITHUB_TOKEN` cannot open pull requests
22 # in this repository, so the PR step below needs a release-bot App token.
23 - name: Generate GitHub App token
24 id: app-token
25 uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
26 with:
27 client-id: ${{ vars.RELEASE_BOT_CLIENT_ID }}
28 private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}
29
30 - name: Checkout repository
31 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32 with:
33 token: ${{ steps.app-token.outputs.token }}
34 ref: next
35 fetch-depth: 1
36
37 - name: Get client definitions
38 env:
39 EVENT_NAME: ${{ github.event_name }}
40 CLIENT_DEFINITIONS: ${{ github.event.client_payload.client_definitions }}
41 DASHBOARD_TAG: ${{ github.event.client_payload.dashboard_tag }}
42 GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
43 run: |
44 set -e
45 if [ "$EVENT_NAME" = "repository_dispatch" ]; then
46 if [ -z "$CLIENT_DEFINITIONS" ]; then
47 echo "::error::repository_dispatch payload missing client_definitions"
48 exit 1
49 fi
50 echo "$CLIENT_DEFINITIONS" | base64 -d > /tmp/client-definitions.ts
51 echo "Received client-definitions.ts from dashboard deploy (tag: $DASHBOARD_TAG)"
52 else
53 echo "Manual trigger — fetching from dashboard repo"
54 gh api \
55 repos/ComposioHQ/composio_dashboard/contents/src/app/\(connect\)/\[org\]/~/connect/clients/_components/client-definitions.ts?ref=main \
56 --jq '.content' | base64 -d > /tmp/client-definitions.ts
57 fi
58
59 if [ ! -s /tmp/client-definitions.ts ]; then
60 echo "::error::client-definitions.ts is empty"
61 exit 1
62 fi
63 echo "$(wc -l < /tmp/client-definitions.ts) lines"
64
65 - name: Sync Connect clients
66 uses: anthropics/claude-code-action@4fa93a88de49bbef68b10eb15aabedf28ca0e1ed # v1.0.271
67 with:
68 anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
69 claude_args: |
70 --allowedTools "Read,Write,Edit,Glob,Grep,Bash(curl *)"
71 prompt: |
72 Sync the Composio Connect clients page from the dashboard repo.
73
74 1. Read docs/agent-guidance/agents/connect-clients-sync.md for full instructions
75 2. The client definitions have already been fetched to /tmp/client-definitions.ts — read that file
76 3. Read the current docs/content/docs/composio-connect.mdx
77 4. Compare and update if there are any differences (new clients, changed steps, updated descriptions)
78 5. Download any new client logos to docs/public/images/clients/
79 6. If no changes are needed, make no file changes
80
81 - name: Create PR if changed
82 id: create-pr
83 uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3
84 with:
85 token: ${{ steps.app-token.outputs.token }}
86 commit-message: 'docs: sync Connect clients from dashboard'
87 title: 'docs: sync Connect clients from dashboard'
88 body: |
89 ## Summary
90 Automated sync of AI client definitions from `ComposioHQ/composio_dashboard`.
91
92 Updates client setup steps, descriptions, and logos on the Composio Connect page.
93
94 ## What may have changed
95 - New or removed AI clients
96 - Updated setup steps (deeplinks, config changes)
97 - Category changes (popular/ide/other)
98 - Client logos
99
100 Generated by Claude Code via GitHub Actions.
101 branch: docs/auto-sync-connect-clients
102 base: next
103 add-paths: |
104 docs/content/docs/composio-connect.mdx
105 docs/public/images/clients/
106
107 - name: Request review from trigger actor
108 if: steps.create-pr.outputs.pull-request-number
109 env:
110 GH_TOKEN: ${{ steps.app-token.outputs.token }}
111 PR_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }}
112 AUTHOR: ${{ github.actor }}
113 run: gh pr edit "$PR_NUMBER" --add-reviewer "$AUTHOR"