@devries-cameron20 / composio-1 / commits / 1efb55eb8
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: handle empty BEFORE/AFTER on workflow_dispatch

On manual trigger, github.event.before and github.event.after are empty. Fall back to HEAD and HEAD~1 respectively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Mar 13, 2026 at 18:36 UTC 1efb55eb859c3f64250d239f87bf739bd27c901b
1 file changed +5 -1
.github/workflows/docs.sdk-change-sync.yml
+5 -1
@@ -31,7 +31,11 @@ jobs:
31 BEFORE: ${{ github.event.before }}
32 AFTER: ${{ github.event.after }}
33 run: |
34 - if [[ "$BEFORE" =~ ^0+$ ]] || ! git cat-file -e "$BEFORE" 2>/dev/null; then
34 + if [ -z "$AFTER" ] || ! git cat-file -e "$AFTER" 2>/dev/null; then
35 + AFTER=$(git rev-parse HEAD)
36 + fi
37 +
38 + if [ -z "$BEFORE" ] || [[ "$BEFORE" =~ ^0+$ ]] || ! git cat-file -e "$BEFORE" 2>/dev/null; then
39 echo "BEFORE ref unavailable — falling back to HEAD~1"
40 BEFORE=$(git rev-parse HEAD~1)
41 fi