Comments (11)
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.
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.
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.
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.
Yep, and what is the problem please?
from php-github-api.
for a string with '%' it will not post, is very weird
from php-github-api.
And for other string it will?
from php-github-api.
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.
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.
@everzet yes for any other string it will
from php-github-api.
I was not able to reproduce that. Closing.
from php-github-api.
Related Issues (20)
- Repo documentation out-of-date? HOT 4
- Secrets Scanning Alerts HOT 1
- Sync a fork branch with the upstream repository
- Document the use of authenticate() using ENV variable HOT 4
- Suggestion to remove authorizations::create from doc HOT 2
- ResultPager::get() can return string HOT 4
- Add .phpstorm.meta.php to improve code completion HOT 1
- Add support for new github api versioning
- Env API
- Correct Async usage
- projects returning empty. HOT 1
- api('issue')->find() is still documented but was removed
- Http\Client\HttpClient Deprecation HOT 2
- GraphQL queries are not cached
- Allow php-http/cache-plugin version 2 HOT 6
- pull request closing references HOT 1
- reactions
- Get owner's repositorie's activity
- Update `Apps` to accept query parameters as per specification
- Cannnot Remove an Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.