Coder Social home page Coder Social logo

gitlab-notify-line's Introduction

Gitlab notifications with Line

Install package with Composer

$ cd service/


service/
|-composer.json
|-index.php
$ composer install

OR

$ composer require pitchanon/line
$ composer require pitchanon/gitlab-notify

Run the image

  • Gitlab
  • PHP
$ docker-compose up -d

PHP

$line = new Pitchanon\GitlabNotify\GitlabNotify();
$line::Config(["token" => "xxxxx"]);
res($line::Notify($data));
$line::Notify("{\"object_kind\":\"push\",\"event_name\":\"push\",\"before\":\"4f6cd4ee61fb8415729db734bc54abd153e60503\",\"after\":\"5da90a158b59f782083a167347c1ba1c7e216d58\",\"ref\":\"refs/heads/master\",\"checkout_sha\":\"5da90a158b59f782083a167347c1ba1c7e216d58\",\"message\":null,\"user_id\":1,\"user_name\":\"Administrator\",\"user_username\":\"root\",\"user_email\":\"[email protected]\",\"user_avatar\":\"https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon\",\"project_id\":1,\"project\":{\"id\":1,\"name\":\"test.local\",\"description\":\"\",\"web_url\":\"http://gitlab.localhost/root/test.local\",\"avatar_url\":null,\"git_ssh_url\":\"[email protected]:root/test.local.git\",\"git_http_url\":\"http://gitlab.localhost/root/test.local.git\",\"namespace\":\"root\",\"visibility_level\":20,\"path_with_namespace\":\"root/test.local\",\"default_branch\":\"master\",\"ci_config_path\":null,\"homepage\":\"http://gitlab.localhost/root/test.local\",\"url\":\"[email protected]:root/test.local.git\",\"ssh_url\":\"[email protected]:root/test.local.git\",\"http_url\":\"http://gitlab.localhost/root/test.local.git\"},\"commits\":[{\"id\":\"5da90a158b59f782083a167347c1ba1c7e216d58\",\"message\":\"Update README.md #3\",\"timestamp\":\"2018-11-06T11:13:47Z\",\"url\":\"http://gitlab.localhost/root/test.local/commit/5da90a158b59f782083a167347c1ba1c7e216d58\",\"author\":{\"name\":\"Administrator\",\"email\":\"[email protected]\"},\"added\":[],\"modified\":[\"README.md\"],\"removed\":[]}],\"total_commits_count\":1,\"repository\":{\"name\":\"test.local\",\"url\":\"[email protected]:root/test.local.git\",\"description\":\"\",\"homepage\":\"http://gitlab.localhost/root/test.local\",\"git_http_url\":\"http://gitlab.localhost/root/test.local.git\",\"git_ssh_url\":\"[email protected]:root/test.local.git\",\"visibility_level\":20}}");

Print console logs.

$ docker exec -it gitlab-line_php_1 tail -f debug.log 

gitlab-notify-line's People

Contributors

pitchanon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.