Giter VIP home page Giter VIP logo

githubhook's People

Contributors

34x avatar acidjazz avatar b7kich avatar daneeveritt avatar federicot avatar foxdigitalmarketingit avatar kwangchin avatar ollieza avatar thomaswelton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

githubhook's Issues

Debug messages not written under certain conditions...

If the payload is missing, it won't be logged with the way the class is setup, even if debug is enabled. This is because, in the constructor, _notFound is called before enableDebug can be. I fixed this by changing the constructor:

    function __construct($debug = FALSE) {
        $this->_debug = $debug;

I left the enableDebug method - it might be useful in some cases.

When using the class, it is as simple as:

$hook = new GitHubHook($debug = TRUE);

($debug = included for clarity in an example case, but is unnecessary)

use syslog for logging

I think it would be better to use syslog for logging. The default setting of having log directory directly on the project root could pose security issue for users who are unaware of the vulnerability. Using syslog also solves the problem of logrotate

Wrong syntax for git pull

Your syntax (https://github.com/kwangchin/GitHubHook/blob/master/class.GitHubHook.php#L173) is:

$cmd='git pull --git-dir='. escapeshellarg($branch['path']) .' options '. escapeshellarg($branch['name']); 

it should be:

$cmd='git --git-dir='. escapeshellarg($branch['path'] . '/.git') .' --work-tree='. escapeshellarg($branch['path']) .' pull origin '. escapeshellarg($branch['name']); 

Also, the '/.git' should probably check for a slash at the end of the path and use '.git' if a slash already exists.

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.