Giter Club home page Giter Club logo

Comments (11)

gquemener avatar gquemener commented on May 28, 2024

I've no problem using directly github api:

curl -H "Accept: application/json" -H "Content-type:application/json" -X POST -d '{"body":" % "}' -u  gquemener https://api.github.com/repos/gquemener/dotfiles/issues/1/comments
Enter host password for user 'gquemener':
{
  "created_at": "2012-09-03T07:20:01Z",
  "updated_at": "2012-09-03T07:20:01Z",
  "url": "https://api.github.com/repos/gquemener/dotfiles/issues/comments/8231112",
  "id": 8231112,
  "body": " % ",
  "user": {
    "avatar_url": "https://secure.gravatar.com/avatar/0181ed39ee0d54457f4eecc13424ce51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
    "login": "gquemener",
    "gravatar_id": "0181ed39ee0d54457f4eecc13424ce51",
    "url": "https://api.github.com/users/gquemener",
    "id": 668604
  }
}

Could you please post here what's going on when you do it when using php github api?

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

try now also not there but on commit page

"body": "%",

On Mon, Sep 3, 2012 at 2:23 AM, Gildas Quéméner [email protected]:

I've no problem using directly github api:

curl -H "Accept: application/json" -H "Content-type:application/json" -X POST -d '{"body":" % "}' -u gquemener https://api.github.com/repos/gquemener/dotfiles/issues/1/comments
Enter host password for user 'gquemener':
{
"created_at": "2012-09-03T07:20:01Z",
"updated_at": "2012-09-03T07:20:01Z",
"url": "https://api.github.com/repos/gquemener/dotfiles/issues/comments/8231112",
"id": 8231112,
"body": " % ",
"user": {
"avatar_url": "https://secure.gravatar.com/avatar/0181ed39ee0d54457f4eecc13424ce51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"login": "gquemener",
"gravatar_id": "0181ed39ee0d54457f4eecc13424ce51",
"url": "https://api.github.com/users/gquemener",
"id": 668604
}
}

Could you please post here what's going on when you do it when using php
github api?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-8231155.

from php-github-api.

gquemener avatar gquemener commented on May 28, 2024

You mean this?

curl -H "Accept: application/json" -H "Content-type:application/json" -X POST -d '{"body":"%"}' -u  gquemener https://api.github.com/repos/gquemener/dotfiles/commits/30c02d2feda45296a7e172c4bb4806030df6dfa7/comments
Enter host password for user 'gquemener':
{
  "position": null,
  "path": null,
  "commit_id": "30c02d2feda45296a7e172c4bb4806030df6dfa7",
  "body": "%",
  "line": null,
  "user": {
    "avatar_url": "https://secure.gravatar.com/avatar/0181ed39ee0d54457f4eecc13424ce51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
    "gravatar_id": "0181ed39ee0d54457f4eecc13424ce51",
    "login": "gquemener",
    "url": "https://api.github.com/users/gquemener",
    "id": 668604
  },
  "created_at": "2012-09-03T11:49:41Z",
  "url": "https://api.github.com/repos/gquemener/dotfiles/comments/1800538",
  "id": 1800538,
  "html_url": "https://github.com/gquemener/dotfiles/commit/30c02d2feda45296a7e172c4bb4806030df6dfa7#commitcomment-1800538",
  "updated_at": "2012-09-03T11:49:41Z"
}

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

hmm i do it with the api, where $comment = '%';

        $postUrl = 'repos/'.
            urlencode($username).'/'.
            urlencode($repoName).'/commits/'.
            urlencode($shaReference).'/comments'
        ;


        return $this->client
            ->post($postUrl,
                array('body' => $comment)
            )
        ;

from php-github-api.

gquemener avatar gquemener commented on May 28, 2024

Yep, and what is the problem please?

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

for a string with '%' it will not post, is very weird

from php-github-api.

everzet avatar everzet commented on May 28, 2024

And for other string it will?

from php-github-api.

gquemener avatar gquemener commented on May 28, 2024

Are sure you are well authenticated?

And there's a class for that repo comment purpose: https://github.com/KnpLabs/php-github-api/blob/master/lib/Github/Api/Repository/Comments.php

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

that class fails badly doing what i am trying above, that is why i used a more base method
i tried of course

i can generate a numeric string very long and post it successfully with the same code

from php-github-api.

cordoval avatar cordoval commented on May 28, 2024

@everzet yes for any other string it will

from php-github-api.

stloyd avatar stloyd commented on May 28, 2024

I was not able to reproduce that. Closing.

from php-github-api.

Related Issues (20)

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.