@devries-cameron20 / composio-1 / commits / f91f7aed6
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.

Add Changelog Notification Workflow (#2574)

Musthaq Ahamad committed Feb 5, 2026 at 12:48 UTC f91f7aed6a3c422630d39d52687c838529d6944a
4 files changed +111 -4
.github/workflows/cli.test-installation.yml renamed
.github/workflows/docs.changelog-notification.yml new
+107
@@ -0,0 +1,107 @@
1 +name: Changelog Notification
2 +
3 +on:
4 + push:
5 + branches: [next]
6 + paths:
7 + - 'docs/content/changelog/**.mdx'
8 +
9 +jobs:
10 + notify-changelog:
11 + name: Send Changelog Notification
12 + runs-on: ubuntu-latest
13 + steps:
14 + - name: Checkout Code
15 + uses: actions/checkout@v6
16 + with:
17 + fetch-depth: 0 # Fetch full history to detect changes across all commits in push
18 +
19 + - name: Get Changed Changelog Files
20 + id: changed-files
21 + run: |
22 + # Get the commit range for this push
23 + BEFORE="${{ github.event.before }}"
24 + AFTER="${{ github.event.after }}"
25 +
26 + echo "Push event details:"
27 + echo " Before: $BEFORE"
28 + echo " After: $AFTER"
29 + echo " Commits in push: $(git rev-list --count "$BEFORE".."$AFTER" 2>/dev/null || echo "N/A")"
30 +
31 + # Handle first push to branch (before SHA is all zeros)
32 + if [[ "$BEFORE" =~ ^0+$ ]]; then
33 + echo "First push to branch detected, checking only the latest commit"
34 + CHANGED_FILES=$(git diff --name-only --diff-filter=AM HEAD^..HEAD | grep '^docs/content/changelog/.*\.mdx$' || echo "")
35 + else
36 + echo "Checking all commits in push range: $BEFORE..$AFTER"
37 + # Get the list of added/modified changelog files across all commits in this push
38 + CHANGED_FILES=$(git diff --name-only --diff-filter=AM "$BEFORE".."$AFTER" | grep '^docs/content/changelog/.*\.mdx$' || echo "")
39 + fi
40 +
41 + if [ -z "$CHANGED_FILES" ]; then
42 + echo "No changelog files changed in this push"
43 + echo "has_changelog=false" >> $GITHUB_OUTPUT
44 + else
45 + echo "Changelog files found:"
46 + echo "$CHANGED_FILES"
47 + # Get the first changelog file (in case multiple were added)
48 + CHANGELOG_FILE=$(echo "$CHANGED_FILES" | head -n 1)
49 + echo ""
50 + echo "Processing changelog: $CHANGELOG_FILE"
51 + echo "changelog_file=$CHANGELOG_FILE" >> $GITHUB_OUTPUT
52 + echo "has_changelog=true" >> $GITHUB_OUTPUT
53 + fi
54 +
55 + - name: Extract Changelog Metadata
56 + if: steps.changed-files.outputs.has_changelog == 'true'
57 + id: extract-metadata
58 + run: |
59 + CHANGELOG_FILE="${{ steps.changed-files.outputs.changelog_file }}"
60 +
61 + # Extract title from frontmatter
62 + TITLE=$(grep "^title:" "$CHANGELOG_FILE" | sed "s/^title: *['\"]*//" | sed "s/['\"]* *$//")
63 +
64 + # Extract date from frontmatter
65 + DATE=$(grep "^date:" "$CHANGELOG_FILE" | sed "s/^date: *['\"]*//" | sed "s/['\"]* *$//")
66 +
67 + # Format date for URL (YYYY-MM-DD to YYYY/MM/DD)
68 + URL_DATE=$(echo "$DATE" | sed 's/-/\//g')
69 +
70 + # Build the changelog URL
71 + CHANGELOG_URL="https://docs.composio.dev/docs/changelog/${URL_DATE}"
72 +
73 + # Get the commit author who added/modified this changelog
74 + AUTHOR=$(git log -1 --format='%an' -- "$CHANGELOG_FILE")
75 + AUTHOR_EMAIL=$(git log -1 --format='%ae' -- "$CHANGELOG_FILE")
76 +
77 + # Build properly escaped JSON payload using jq
78 + SLACK_PAYLOAD=$(jq -n \
79 + --arg title "$TITLE" \
80 + --arg date "$DATE" \
81 + --arg url "$CHANGELOG_URL" \
82 + --arg author "$AUTHOR" \
83 + '{text: "*New Changelog Published*\n\n*\($title)*\n\nDate: \($date)\n<\($url)|View Changelog>\nAuthor: \($author)"}')
84 +
85 + echo "title=$TITLE" >> $GITHUB_OUTPUT
86 + echo "date=$DATE" >> $GITHUB_OUTPUT
87 + echo "url=$CHANGELOG_URL" >> $GITHUB_OUTPUT
88 + echo "author=$AUTHOR" >> $GITHUB_OUTPUT
89 + echo "author_email=$AUTHOR_EMAIL" >> $GITHUB_OUTPUT
90 +
91 + # Save the JSON payload for the next step
92 + echo "slack_payload<<EOF" >> $GITHUB_OUTPUT
93 + echo "$SLACK_PAYLOAD" >> $GITHUB_OUTPUT
94 + echo "EOF" >> $GITHUB_OUTPUT
95 +
96 + echo "📝 Changelog Title: $TITLE"
97 + echo "📅 Date: $DATE"
98 + echo "🔗 URL: $CHANGELOG_URL"
99 + echo "👤 Author: $AUTHOR ($AUTHOR_EMAIL)"
100 +
101 + - name: Send Slack Notification
102 + if: steps.changed-files.outputs.has_changelog == 'true'
103 + uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1
104 + with:
105 + payload: ${{ steps.extract-metadata.outputs.slack_payload }}
106 + env:
107 + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CUSTOMER_COMMS_WEBHOOK_URL }}
.github/workflows/security.secrets-detection.yml renamed
.github/workflows/ts.release.yml
+4 -4
@@ -4,7 +4,7 @@ on:
4 workflow_dispatch:
5 push:
6 branches: [next]
7 -
7 +
8 env:
9 GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
10
@@ -38,8 +38,8 @@ jobs:
38 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
39 with:
40 publish: pnpm changeset:release
41 - commit: "Release: update version"
42 - title: "Release: update version"
41 + commit: 'Release: update version'
42 + title: 'Release: update version'
43
44 - name: Set Version Info
45 if: steps.changesets.outputs.published == 'true'
@@ -56,4 +56,4 @@ jobs:
56 "text": "🚀 New SDK version published!\n*Repository:* ${{ github.repository }}\n*Versions:*\n${{ env.SLACK_VERSIONS }}\n*Commit:* ${{ github.sha }}"
57 }
58 env:
59 - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
59 + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}