Download the PHP package love-oss/github-event-parser without Composer

On this page you can find all versions of the php package love-oss/github-event-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package github-event-parser

Github event parser library

PHPStan

This library is a reupload of a library created by Mickaël Andrieu in 2016 for the Lp Digital web agency, Paris, France. We have obtained the authorization from the former creator to change the licence from GNU-GPL v2 to MIT. PHP Developers : consider using love-oss/github-event-parser as a direct replacement of lp-digital/github-event-parser.

Github Event Parser is a naive PHP library aimed to provide readable representations of json responses from Github Events Api v3.

Thanks to the Github webhooks, any administrator of a repository can access and listen theses events returned into json responses.

The only aim of this library is to parse theses responses, and create simple POPO (Plain Old PHP Object) easy to manipulate, extends or even persist in a database.

A lot of usages are available since you can listen all events:

Installation

PHP requirements

The library may access to GitHub API to retrieve additional information. Your PHP configuration may have allow_url_fopen and a valid user_agent enabled, or some informations won't be retrieved.

You can use InvalidPhpConfigurationException to catch the exception:

How to resolve a json response from Github ?

Once your webhook is set up, you should receive POST responses from github each time an event is dispatched by the platform.

For instance, let's consider you have a simple github-hook.php file and have installed your dependency through composer:

EventTypes

Note that this library is not complete, so only few events are available for now. But, it's realy easy to implement the missing. If you need them, please make a pull request!

IssueCommentEvent

Dispatched when someone comment an issue

You can retrieve the issue, the user and the related comment from this event.

IssuesEvent

Dispatched when an issue is assigned, unassigned, labeled, unlabeled, opened, closed, or reopened.

You can retrieve the action, the repository and the sender from this event. When available, you can also get assignee and label.

ForkEvent

Dispatched when someone fork the repository

You can retrieve the forked repository, the owner, the new repository and the "forker".

DeploymentStatusEvent

Dispatched when a deployement's status changes

You can retrieve the deployment, the sender and the related repository.

PullRequestEvent

Dispatched when a pull request is assigned, unassigned, labeled, unlabeled, opened, closed, reopened, or synchronized.

PushEvent

Dispatched when a repository branch is pushed to. In addition to branch pushes, webhook push events are also triggered when repository tags are pushed.

StatusEvent

Dispatched when the status of a Git commit changes. Events of this type are not visible in timelines, they are only used to trigger hooks.

You can retrieve the sha, the status, the committer and the related repository. More others informations are available.

WatchEvent

The WatchEvent is related to starring a repository, not watching. See this API blog post for an explanation. The event’s actor is the user who starred a repository, and the event’s repository is the repository that was starred.

PullRequestReviewCommentEvent

Dispatched when a comment is created on a portion of the unified diff of a pull request.

GollumEvent

Dispatched when a Wiki page is created or updated.

Entities

Each object from Github API have his PHP class.

Roadmap

How to contribute ?

All features are tested, and all contributions need to be tested in order to be accepted.

Features from roadmap and bug fixes are prioritized. Fork the repository, create a feature branch and then launch the testsuite:

Thank you for help, let us know if you use this library ;)


All versions of github-event-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package love-oss/github-event-parser contains the following files

Loading the files please wait ....