{"id":33976978,"url":"https://github.com/digitlimit/githook","last_synced_at":"2026-03-17T20:13:51.385Z","repository":{"id":56968961,"uuid":"418303777","full_name":"digitlimit/githook","owner":"digitlimit","description":"A Laravel package to handle GitHub webhooks seamlessly by dispatching Laravel events for all GitHub events. Users can listen to and handle these events easily.","archived":false,"fork":false,"pushed_at":"2024-11-11T14:23:41.000Z","size":30592,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-14T14:44:24.666Z","etag":null,"topics":["github-webhooks","laravel","laravel-events","laravel-github"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitlimit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-18T01:32:46.000Z","updated_at":"2024-11-11T14:23:45.000Z","dependencies_parsed_at":"2024-10-27T23:38:00.580Z","dependency_job_id":"ad143a2b-0921-4415-855e-3034e94f5c88","html_url":"https://github.com/digitlimit/githook","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"c3fa6354c0ecf8b6480155b1388b90019e76ba00"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/digitlimit/githook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitlimit%2Fgithook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitlimit%2Fgithook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitlimit%2Fgithook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitlimit%2Fgithook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitlimit","download_url":"https://codeload.github.com/digitlimit/githook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitlimit%2Fgithook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30630317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-webhooks","laravel","laravel-events","laravel-github"],"created_at":"2025-12-13T02:04:29.839Z","updated_at":"2026-03-17T20:13:51.372Z","avatar_url":"https://github.com/digitlimit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Githook\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/digitlimit/githook.svg?style=flat-square)](https://packagist.org/packages/digitlimit/githook)\n[![Total Downloads](https://img.shields.io/packagist/dt/digitlimit/githook.svg?style=flat-square)](https://packagist.org/packages/digitlimit/githook)\n![GitHub Actions](https://github.com/digitlimit/githook/actions/workflows/githook.yml/badge.svg)\n![PHP versions](https://img.shields.io/badge/PHP-8.0%20|%208.2%20|%208.3-blue.svg)\n\nA Laravel package to handle GitHub webhooks seamlessly by dispatching Laravel events for all GitHub events. Users can listen to and handle these events easily.\n\n![image](https://github.com/user-attachments/assets/2390e740-96bd-4c3f-b848-60beee43674a)\n\n\n## Installation\n\nTo install the package, use Composer:\n\n```bash\ncomposer require digitlimit/githook\n```\n\n## Configuration\nPublish Configuration File\nTo publish the configuration file, run:\n\n```bash\nphp artisan vendor:publish --provider=\"Digitlimit\\Githook\\GithookServiceProvider\"\n```\n\n## Configure Environment Variables\nAdd the following environment variables to your .env file:\n\n```\nGITHOOK_SECRET=your-github-webhook-secret\n```\n\n## Available Events\nHere are the events you can subscribe to:\n\n```\nuse Digitlimit\\Githook\\Events\\BranchProtectionConfiguration;\nuse Digitlimit\\Githook\\Events\\BranchProtectionRule;\nuse Digitlimit\\Githook\\Events\\CheckRun;\nuse Digitlimit\\Githook\\Events\\CheckSuite;\nuse Digitlimit\\Githook\\Events\\CodeScanningAlert;\nuse Digitlimit\\Githook\\Events\\CommitComment;\nuse Digitlimit\\Githook\\Events\\Create;\nuse Digitlimit\\Githook\\Events\\CustomProperty;\nuse Digitlimit\\Githook\\Events\\CustomPropertyValues;\nuse Digitlimit\\Githook\\Events\\Delete;\nuse Digitlimit\\Githook\\Events\\DependabotAlert;\nuse Digitlimit\\Githook\\Events\\DeployKey;\nuse Digitlimit\\Githook\\Events\\Deployment;\nuse Digitlimit\\Githook\\Events\\DeploymentProtectionRule;\nuse Digitlimit\\Githook\\Events\\DeploymentReview;\nuse Digitlimit\\Githook\\Events\\DeploymentStatus;\nuse Digitlimit\\Githook\\Events\\Discussion;\nuse Digitlimit\\Githook\\Events\\DiscussionComment;\nuse Digitlimit\\Githook\\Events\\Fork;\nuse Digitlimit\\Githook\\Events\\GithubAppAuthorization;\nuse Digitlimit\\Githook\\Events\\Gollum;\nuse Digitlimit\\Githook\\Events\\Installation;\nuse Digitlimit\\Githook\\Events\\InstallationRepositories;\nuse Digitlimit\\Githook\\Events\\InstallationTarget;\nuse Digitlimit\\Githook\\Events\\IssueComment;\nuse Digitlimit\\Githook\\Events\\Issues;\nuse Digitlimit\\Githook\\Events\\Label;\nuse Digitlimit\\Githook\\Events\\MarketplacePurchase;\nuse Digitlimit\\Githook\\Events\\Member;\nuse Digitlimit\\Githook\\Events\\Membership;\nuse Digitlimit\\Githook\\Events\\MergeGroup;\nuse Digitlimit\\Githook\\Events\\Meta;\nuse Digitlimit\\Githook\\Events\\Milestone;\nuse Digitlimit\\Githook\\Events\\OrgBlock;\nuse Digitlimit\\Githook\\Events\\Organization;\nuse Digitlimit\\Githook\\Events\\Package;\nuse Digitlimit\\Githook\\Events\\PageBuild;\nuse Digitlimit\\Githook\\Events\\PersonalAccessTokenRequest;\nuse Digitlimit\\Githook\\Events\\Ping;\nuse Digitlimit\\Githook\\Events\\Project;\nuse Digitlimit\\Githook\\Events\\ProjectCard;\nuse Digitlimit\\Githook\\Events\\ProjectColumn;\nuse Digitlimit\\Githook\\Events\\ProjectsV2;\nuse Digitlimit\\Githook\\Events\\ProjectsV2Item;\nuse Digitlimit\\Githook\\Events\\ProjectsV2StatusUpdate;\nuse Digitlimit\\Githook\\Events\\PublicEvent;\nuse Digitlimit\\Githook\\Events\\PullRequest;\nuse Digitlimit\\Githook\\Events\\PullRequestReview;\nuse Digitlimit\\Githook\\Events\\PullRequestReviewComment;\nuse Digitlimit\\Githook\\Events\\PullRequestReviewThread;\nuse Digitlimit\\Githook\\Events\\Push;\nuse Digitlimit\\Githook\\Events\\RegistryPackage;\nuse Digitlimit\\Githook\\Events\\Release;\nuse Digitlimit\\Githook\\Events\\Repository;\nuse Digitlimit\\Githook\\Events\\RepositoryAdvisory;\nuse Digitlimit\\Githook\\Events\\RepositoryDispatch;\nuse Digitlimit\\Githook\\Events\\RepositoryImport;\nuse Digitlimit\\Githook\\Events\\RepositoryRuleset;\nuse Digitlimit\\Githook\\Events\\RepositoryVulnerabilityAlert;\nuse Digitlimit\\Githook\\Events\\SecretScanningAlert;\nuse Digitlimit\\Githook\\Events\\SecretScanningAlertLocation;\nuse Digitlimit\\Githook\\Events\\SecurityAdvisory;\nuse Digitlimit\\Githook\\Events\\SecurityAndAnalysis;\nuse Digitlimit\\Githook\\Events\\Sponsorship;\nuse Digitlimit\\Githook\\Events\\Star;\nuse Digitlimit\\Githook\\Events\\Status;\nuse Digitlimit\\Githook\\Events\\SubIssues;\nuse Digitlimit\\Githook\\Events\\Team;\nuse Digitlimit\\Githook\\Events\\TeamAdd;\nuse Digitlimit\\Githook\\Events\\Watch;\nuse Digitlimit\\Githook\\Events\\WorkflowDispatch;\nuse Digitlimit\\Githook\\Events\\WorkflowJob;\nuse Digitlimit\\Githook\\Events\\WorkflowRun;\nuse Digitlimit\\Githook\\Events\\Generic;\n```\n\n## Subscribing to Events\nYou can subscribe to events either in the Laravel Event Service Provider or directly in the configuration file.\n\n## Using Event Service Provider\nTo subscribe to events in the Event Service Provider, add the following to your app/Providers/EventServiceProvider.php:\n\n```\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider as ServiceProvider;\nuse Digitlimit\\Githook\\Events\\Star;\nuse App\\Listeners\\HandleStar;\n\nclass EventServiceProvider extends ServiceProvider\n{\n    protected $listen = [\n        Star::class =\u003e [\n            HandleStar::class,\n        ],\n    ];\n\n    public function boot()\n    {\n        parent::boot();\n    }\n}\n```\n\n# Using the Configuration File\nAlternatively, you can subscribe to events directly in the configuration file `config/githook.php`:\n```\nreturn [\n    'events' =\u003e [\n        'star' =\u003e [\n            'event' =\u003e Events\\Star::class,\n            'listeners' =\u003e [\n                \\App\\Listeners\\HandleStar::class,\n            ],\n        ],\n    ],\n    ...\n];\n```\n\n## Example Listener\nHere is an example listener for the `Star` event:\n```\nnamespace App\\Listeners;\n\nuse Digitlimit\\Githook\\Events\\Star;\n\nclass HandleStar\n{\n    public function handle(Star $event)\n    {\n        // Handle the event\n    }\n}\n```\n\n## How to setup webhook in GitHub\n1. Setup Github Webhook if you have not done so.\nhttps://github.com/your-username/your-repo/settings/hooks\n\n![image](https://user-images.githubusercontent.com/2041419/137665069-f330f1e5-3907-4e59-a6b3-79c95be40ba0.png)\n\n### Testing\n\n```bash\ncomposer install\nphp vendor/bin/testbench package:test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email frankemeks77@yahoo.com instead of using the issue tracker.\n\n## Credits\n\n-   [Emeka Mbah](https://github.com/digitlimit)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitlimit%2Fgithook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitlimit%2Fgithook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitlimit%2Fgithook/lists"}