Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Github Webhooks Laravel Package

spatie/laravel-github-webhooks

Handle GitHub webhooks in Laravel: verify signatures, log valid calls, and dispatch jobs/events per webhook type. Includes a GitHubWebhookCall model to access payloads and queueable handlers for event-driven integrations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Accelerates development by eliminating the need to build custom GitHub webhook handling from scratch, reducing time-to-market for features like issue tracking, PR automation, or CI/CD integrations.
  • Feature Expansion: Enables real-time integrations with GitHub events (e.g., issue creation, PR merges, deployments) without overloading core application logic. Supports:
    • Developer Tools: Trigger workflows (e.g., auto-assigning issues, Slack notifications).
    • DevOps: Sync GitHub events with internal systems (e.g., Jira, Trello, or custom dashboards).
    • Customer-Facing Features: Power "GitHub-powered" features (e.g., public roadmaps, community contributions).
  • Roadmap Prioritization: Validates demand for GitHub integrations before committing engineering resources. Example use cases:
    • Open-Source Projects: Automate contributor onboarding via webhooks.
    • Enterprise: Securely process GitHub Actions or Code Owners events for compliance.
  • Scalability: Decouples webhook processing from request handling via Laravel’s queue system, ensuring reliability at scale (critical for high-traffic apps or SaaS platforms).

When to Consider This Package

Adopt when:

  • Your Laravel app needs to react to GitHub events (e.g., issues, PRs, deployments) in real-time or near-real-time.
  • You require signature verification and audit logging for security/compliance (e.g., tracking all incoming webhooks).
  • You want to avoid custom middleware for webhook validation and routing.
  • Your team lacks expertise in low-level HTTP/webhook handling (e.g., parsing payloads, managing retries).
  • You need queue-based processing to handle spikes in webhook volume (e.g., during major releases).

Look elsewhere if:

  • You’re using non-Laravel stacks (e.g., Django, Node.js). Consider native libraries like probot or github-webhook-handler.
  • You need complex event filtering (e.g., only process PRs from specific repos). The package supports wildcards (*) but may require custom logic for nuanced rules.
  • Your use case involves GitHub App authentication (e.g., installing apps on repos). This package focuses on repository/webhook-level events, not OAuth/App-level flows.
  • You’re building a highly customized webhook system (e.g., multi-provider support). The package is GitHub-specific.
  • Your team prefers serverless (e.g., AWS Lambda). While possible, the package assumes a Laravel queue worker (e.g., queue:work).

How to Pitch It (Stakeholders)

For Executives/Stakeholders:

"This package lets us leverage GitHub’s real-time events (e.g., issues, PRs, deployments) to automate workflows without building custom infrastructure.**

  • Saves 3–6 weeks of dev time by handling webhook validation, logging, and routing out-of-the-box.
  • Reduces risk with built-in signature verification and audit trails (critical for security/compliance).
  • Scales effortlessly: Uses Laravel’s queue system to handle spikes (e.g., during open-source project releases).
  • Enables features like:
    • Auto-assigning issues to teams based on labels.
    • Syncing GitHub milestones to our roadmap dashboard.
    • Triggering CI/CD pipelines or Slack alerts for deployments.
  • Low cost: MIT-licensed, open-source, and maintained by Spatie (trusted Laravel contributors).
  • Future-proof: Supports all GitHub webhook events, so we can add integrations as needed."

Ask: "Which GitHub events are highest priority for our roadmap? We can scope this as a 2–4 week project."


For Engineering Teams:

"This package abstracts the boilerplate of GitHub webhook handling in Laravel, so we can focus on business logic.** Key benefits:

  1. Automatic Validation: Verifies GitHub signatures and rejects invalid requests (security by default).
  2. Queue-Based Processing: Decouples webhook handling from HTTP requests to avoid timeouts.
  3. Audit Logging: Stores all webhook payloads in github_webhook_calls for debugging/retries.
  4. Flexible Routing: Map GitHub events (e.g., issues.opened) to custom jobs or Laravel events.
  5. Retries Made Easy: Failed jobs can be reprocessed manually via ProcessGitHubWebhookJob.

How to Start:

  1. Install: composer require spatie/laravel-github-webhooks.
  2. Publish config/migrations: php artisan vendor:publish --provider="Spatie\GitHubWebhooks\GitHubWebhooksServiceProvider".
  3. Route webhooks: Route::githubWebhooks('webhook-endpoint') in api.php.
  4. Define jobs/events in config/github-webhooks.php (e.g., issues.openedHandleIssueJob).

Trade-offs:

  • Not for GitHub Apps: Only handles repository/webhook-level events (no OAuth/App installations).
  • Laravel-only: If we later adopt a multi-stack system, we’d need to rewrite this logic.
  • Minimal Customization: For advanced use cases (e.g., multi-provider), we’d need to extend the package.

Proposal: "Let’s prototype this for [high-priority event X] in 1 week. If it works, we can expand to [other events Y/Z]."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope