Integrations

Lingxi · Webhook Dispatcher with GitHub API Fallback

Try it

Intelligent webhook dispatcher with GitHub API fallback. Automatically handles git push failures by routing to GitHub Contents API. Supports retry logic, del...

What it does

Intelligent webhook dispatcher with GitHub API fallback. Automatically handles git push failures by routing to GitHub Contents API. Supports retry logic, delivery receipts, and multi-endpoint fan-out.

The skill document

lingxi-webhook-dispatcher

An intelligent webhook routing system with automatic GitHub API fallback when standard push fails.

Problem It Solves

Git push can fail due to:

  • Port 443 blocked by firewall/network
  • DNS resolution issues
  • SSL certificate problems
  • Rate limiting on git protocol

This skill provides a robust fallback: when git push fails, automatically route to GitHub Contents API (PUT /repos/{owner}/{repo}/contents/{path}) to upload files directly.

Architecture

git push → [fails] → Webhook Dispatcher
  → GitHub Contents API (fallback upload)
  → Retry logic (exponential backoff)
  → Delivery receipt (JSON log)
  → Alert notification (if still failing)

Usage

Trigger: Automatic on git push failure

When: git push fails in any workflow
Action: Dispatcher intercepts → GitHub API fallback → Upload files
Output: Delivery receipt at ~/webhook-dispatch/logs/YYYY-MM-DD.json

Manual Dispatch

Trigger: "Dispatch files to GitHub via API"
Action: Uploads specified files to GitHub using Contents API

Fan-out Dispatch

Trigger: "Push this update to repos: [repo1, repo2, repo3]"
Action: Parallel upload to all specified repos
Output: Summary report of success/failure per repo

Configuration

{
  "github_token": "ghp_xxx",
  "default_owner": "nima54851",
  "retry_attempts": 3,
  "retry_backoff_ms": 1000,
  "log_path": "~/webhook-dispatch/logs/",
  "alert_webhook": "https://your-alert-channel.com/webhook"
}

GitHub Contents API Upload Flow

# 1. Get current file SHA (if exists)
gh api repos/{owner}/{repo}/contents/{path} --jq '.sha'

# 2. Upload with SHA for update (or no SHA for new files)
gh api -X PUT repos/{owner}/{repo}/contents/{path} \
  -f message="Automated dispatch: {timestamp}" \
  -f content=$(base64 -w 0 file.txt) \
  -f sha={sha}

Retry Logic

AttemptDelayStrategy
1ImmediateDirect API call
21 secondExponential backoff
33 secondsExponential backoff
410 secondsAlert + final attempt

Installation

clawhub install lingxi-webhook-dispatcher

Integration with GitHub Actions

Add to your workflow as a fallback step:

- name: GitHub API Fallback Dispatch
  if: failure()
  run: |
    curl -X POST https://your-dispatcher-endpoint.com/dispatch \
      -H "Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}" \
      -d '{"event": "push_failure", "repo": "${{ github.repository }}"}'

Use Cases

  1. CI/CD Pipeline Fallback: When git push fails in CI, use API to push artifacts
  2. Automated Reports: Daily/weekly reports uploaded via API instead of git
  3. Multi-repo Sync: Push same content to multiple repos simultaneously
  4. Offline-to-Online Sync: Store changes locally, sync via API when network is available

Related skills

Webhook infrastructure for receiving, queuing, and delivering webhooks. Operate Hookaido webhook ingress, durable webhook queue (SQLite/Postgres), webhook de...

56 installs1 stars

Complete daily operations automation for GitHub projects — automated GitHub interactions (star, comment, PR review), daily report generation, trending watch,...

Receive external webhooks and callbacks in real time by exposing a local HTTP endpoint via aitun tunnel. Perfect for AI agents that need to handle GitHub web...

6 installs1 stars

Monitor GitHub Trending daily, use AI to analyze and summarize the hottest projects — with topic tagging, star growth prediction, and formatted digest output...

1 installs

自动化配置 pi 在 GitHub/git 的行动(纯 Git Bash 驱动):环境探测 → 传输通道决策(https/GCM 或 SSH)→ 浏览器 OAuth → 带口令 SSH 密钥 + agent → 建仓推送 → post-commit 自动推送 + 计划任务兜底。内置敏感信息传递 SOP(令牌/口令/密钥/cookie 零明文)。当用户说"配置 github / 自动推送 / 建仓库 / 推送仓库 / 配置 git"时使用。

Give your AI agents and automations their own GitHub (App) identity. Authenticate using GitHub Apps so every commit, PR, and action is attributed to the bot — not your personal account. Supports multiple profiles for running several GitHub Apps (e.g. one per client/org) from the same machine.

1 installs