2017 © Pedro Peláez
 

library gitlab-webhook-lib

Simple PHP library for working with gitlab webhooks

image

timo-reymann/gitlab-webhook-lib

Simple PHP library for working with gitlab webhooks

  • Wednesday, March 14, 2018
  • by timo-reymann
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GitLab Webhook Library

Version Build Status, (*1)

What is this?

Simple library for PHP to work with Gitlab webhooks in a easy and natural way, (*2)

Usage

Installation

Install using composer: composer require timo-reymann/gitlab-webhook-lib, (*3)

Documentation

For PHP class documentation please visit timo-reymann.github.io/gitlab-webhook-lib, (*4)

Use in your scripts

First create a webhook object and pass your secret token, (*5)

$hook = new \TimoReymann\GitlabWebhookLibrary\Core\Webhook(
  new \TimoReymann\GitlabWebhookLibrary\Token\SecretToken('mySuperSecretToken')
);

To evaluate the header for your secret token and the event. Be aware that this method may throw an exception if the request is not valid!, (*6)

$hook->parse();

Finally you can work with the result, if you would like to, the "expensive" members are internally cached after you first call them. So you don't have hidden performance bottlenecks. The resulting object is based on the gitlab event type passed via header., (*7)

$hook->getResult()

The Versions

14/03 2018

dev-master

9999999-dev

Simple PHP library for working with gitlab webhooks

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Timo Reymann

03/03 2018

1.0.0

1.0.0.0

Simple PHP library for working with gitlab webhooks

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Timo Reymann