feat(trigger-dev): GitHub AI agent demo (Hookdeck + Trigger.dev)#6
feat(trigger-dev): GitHub AI agent demo (Hookdeck + Trigger.dev)#6
Conversation
Three AI-powered tasks triggered by GitHub webhooks via Hookdeck: - handle-pr: fetches PR diff, generates review summary with Claude, posts as PR comment - handle-issue: classifies issues with Claude, auto-applies labels - handle-push: summarizes deployments with Claude, posts to Slack Includes two integration patterns: - Pattern A: single Hookdeck connection, fan-out router task - Pattern B: per-event Hookdeck connections with header-based filter rules Shared utilities: Hookdeck event verification, GitHub API helpers, Anthropic SDK wrapper, Slack incoming webhook helper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- setup-hookdeck.sh: idempotent creation of all Hookdeck resources (source, destinations, connections, filters, transformation) for both Pattern A and Pattern B using hookdeck CLI upsert - setup-github-webhook.sh: registers GitHub webhook pointing to Hookdeck source URL, checks for existing webhook to avoid duplicates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- setup.sh walks through all credentials interactively - Auto-generates GITHUB_WEBHOOK_SECRET (random hex) - Auto-detects GITHUB_TOKEN from gh CLI - Auto-detects GITHUB_REPO from current repo - Prompts with help text for manual credentials - Slack webhook URL is optional (task logs to console if skipped) - Supports --check mode to verify .env - Orchestrates deploy + hookdeck setup + github webhook in sequence Also: slack.ts gracefully handles missing SLACK_WEBHOOK_URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Setup: interactive setup.sh, quoted .env, GITHUB_LABELS from repo, prod-only Trigger keys - Hookdeck: capture source URL from connection output; GitHub webhook -F active (boolean) - trigger-wrapper: verified flag from context when headers absent - Trigger: syncEnvVars + --env-file .env, GITHUB_ACCESS_TOKEN - Tasks: Hookdeck payload types, Anthropic/GitHub env handling - Docs + collaboration build plan Made-with: Cursor
- Summarize any branch by default; GITHUB_PUSH_SUMMARY_DEFAULT_BRANCH_ONLY=true for main-only - Slack message shows branch; README + .env.example document optional env Made-with: Cursor
…okdeck fan-out - Add Mermaid diagrams (vertical), component captions, setup caveat - Frame Pattern A as Trigger fan-out (router) vs Pattern B as Hookdeck fan-out - Update collaboration build plan as needed Made-with: Cursor
…igger.dev co-promotion - Add GUIDE.md: long-form tutorial covering GitHub webhook automation with Hookdeck as the webhook edge and Trigger.dev as the task runtime, with Claude powering PR review, issue labeling, and Slack push summaries - Add images/: annotated screenshots for Hookdeck events, connections, source verification, and Trigger.dev run detail views - Simplify trigger-wrapper.js: remove in-transform HMAC verification; source-level verification (GitHub HMAC) is handled by Hookdeck at the source, making the payload-level check redundant - Remove verifyHookdeckEvent from all tasks and lib/verify-hookdeck.ts; the _hookdeck.verified flag is no longer set by the transform - Update setup-hookdeck.sh to reflect current connection names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Correct JSON formatting in examples for pull request payloads - Update Hookdeck connections view image to reflect current state - Add new image for Hookdeck connections overview - Remove redundant line in the task routing section for clarity
- Remove outdated URL note regarding repository location - Clarify the behavior of GitHub event delivery when the task router is paused - Minor formatting adjustments for improved readability
- Add images illustrating AI-generated comments for GitHub PRs and issue labeling - Include a screenshot of Slack push summary messages generated by the AI agent - Improve visual documentation for better understanding of task functionalities
- Add JavaScript code snippet demonstrating header extraction and request transformation for GitHub events - Improve documentation clarity on how to bridge GitHub event formats with Trigger.dev expectations
…terminology - Revise section on routing patterns to enhance understanding of task routing and edge processing - Clarify the role of the transform in adapting GitHub event formats for Trigger.dev - Update headings and descriptions for consistency and better readability
- Add Trigger.dev CLI login as a prerequisite and inline prompt before deploy step (npx trigger.dev@latest login required before npm run deploy) - Clarify GITHUB_WEBHOOK_SECRET is user-chosen, suggest openssl rand -hex 32 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…plicates On each push to a PR, handle-pr now finds the existing AI review comment (identified by an invisible HTML marker) and updates it in place rather than posting a new comment each time. Adds findExistingComment and updateComment helpers to github.ts. Updates GUIDE.md to document the upsert behaviour and updated code snippet.
AI Review SummarySummaryThis PR introduces a comprehensive GitHub AI agent demo that integrates Hookdeck and Trigger.dev. It sets up automated workflows for PR code reviews, issue labeling, and deployment notifications using Claude AI, with interactive setup scripts and production deployment capabilities. Key ObservationsStrengths:
Potential Concerns:
Suggestions for Improvement
The core architecture and implementation look solid - this addresses a real developer need with a thoughtful technical approach. Generated by Hookdeck + Trigger.dev |
AI Review SummarySummaryThis pull request adds a comprehensive GitHub AI agent demo showcasing Hookdeck + Trigger.dev integration. It includes interactive setup scripts, webhook handling improvements, production deployment automation, and detailed documentation for building AI-powered GitHub automation workflows. Key ObservationsStrengths:
Potential Concerns:
Suggestions for Improvement
The demo showcases excellent integration patterns and would be valuable for developers building webhook-driven automation. The automation and documentation quality are impressive. Generated by Hookdeck + Trigger.dev |
Summary
Polishes the
trigger-dev/github-ai-agentdemo: interactive setup, Hookdeck + GitHub webhook fixes, Trigger.dev Production deploy + env sync, transformation + task hardening, docs.Notes
pull_requestopened/synchronizeevents — the AI review task runs the same unless we filterpull_request.draftin code.Test plan
npm run setup/npm run deployfrom demo folderMade with Cursor