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 unreachable BEFORE ref in sdk-change-sync
Fall back to HEAD~1 when the before SHA is either null or not reachable (e.g., after a force-push). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmitha Mallesh committed
Mar 13, 2026 at 18:05 UTC
ec67eed72f8ae87ba0827f9367e42ab49ea2b95c
1 file changed
+2
-2
.github/workflows/docs.sdk-change-sync.yml
+2
-2
@@ -29,8 +29,8 @@ jobs:
29
BEFORE: ${{ github.event.before }}
30
AFTER: ${{ github.event.after }}
31
run: |
32
- if [[ "$BEFORE" =~ ^0+$ ]]; then
33
- echo "First push or force-push — diffing against HEAD~1"
32
+ if [[ "$BEFORE" =~ ^0+$ ]] || ! git cat-file -e "$BEFORE" 2>/dev/null; then
33
+ echo "BEFORE ref unavailable — falling back to HEAD~1"
34
BEFORE=$(git rev-parse HEAD~1)
35
fi
36