Giter Site home page Giter Site logo

github's People

Contributors

fprochazka avatar mikulas avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

github's Issues

Undefined constant CURLE_SSL_CACERT_BADFILE

I'm getting this notice:

PHP Notice: Use of undefined constant CURLE_SSL_CACERT_BADFILE - assumed 'CURLE_SSL_CACERT_BADFILE' in /var/www/.../vendor/kdyby/github/src/Kdyby/Github/Api/CurlClient.php:151 

PHP 5.4.4

Not sure if it has any impact on anything (extension works), but thought you should know... :) The code was added in #1...

Wrong POST escaping

When trying to create a hook:

return $this->github->api('/repos/:owner/:repo/hooks', Api\Request::POST, [], [
    'name' => 'web',
    'active' => '1',
    'events' => [
        'push',
        'pull_request'
    ],
    'config' => [
        'url' => 'http://example.net/some/url',
        'content-type' => 'json'
    ]
]);

Github responds with "Problems parsing JSON". The problem appears to be here. It properly encodes values as JSON, but leaves the whole array as array. So when it is pased to CURL, it encodes it again, and messes up (doble escapes) the values.

EDIT: Just to clarify, when that line is replaced by simple $this->post = Json::encode($post);, it works, for this example. Not sure why the whole logic about UrlScript or CURLFile is there though. Probably for a reason, so it's probably not a good solution.

EDIT2: Now that I look at it, when you pass the encoded JSON string as a post parameter, it works fine. Which is probably how you're supposed to use it. Oh well, it was late last night when I wrote this :) Anyway, the issue is still relevant, because the behaviour I described is certainly not what I expected. But maybe just a clarifying docs would do the trick?...

New maintainer?

Hello everyone.
We're looking for a new maintainer for this repository. If you're using it in your project, I offer you to take over this repository.

It would be a great help for everyone and IMHO it's better than to maintain a fork :)

Otherwise, It will be marked as abadoned on packagist in a week or so.

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.