Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-GitHub CPAN distribution.

Report information
The Basics
Id: 106132
Status: open
Priority: 0/
Queue: Net-GitHub

People
Owner: Nobody in particular
Requestors: matt [...] theblackburns.us
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Unable to Create Comments for Pull Request
Date: Tue, 28 Jul 2015 12:37:31 -0400
To: bug-Net-GitHub [...] rt.cpan.org
From: Matt Blackburn <matt [...] theblackburns.us>
Packed Installed: Net-GitHub-0.77 Net::Github::V3 Individual versions: Events.pm:our $VERSION = '0.60'; Gists.pm:our $VERSION = '0.60'; GitData.pm:our $VERSION = '0.72'; Issues.pm:our $VERSION = '0.60'; OAuth.pm:our $VERSION = '0.60'; Orgs.pm:our $VERSION = '0.60'; PullRequests.pm:our $VERSION = '0.63'; Query.pm:our $VERSION = '0.76'; Query.pm: agent => "perl-net-github/$VERSION", Repos.pm:our $VERSION = '0.64'; Search.pm:our $VERSION = '0.68'; Users.pm:our $VERSION = '0.60'; Perl Version for Windows: This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Running Windows 7 64 bit This is the last call to create the comment: my $comment = $pull_request->create_comment($pull_id->{number},{"body"=> "Dude I Did it"}); Data from the Query Module: Show quoted text
>>> (POST) (
http://fmc05955.fsillab.ford.com/api/v3/repos/Magellan/msbtest/pulls/8/comments ) Show quoted text
>>> $VAR1 = {
'body' => 'Dude I Did it' }; Show quoted text
>>> $VAR1 = bless( {
'_protocol' => 'HTTP/1.1', '_content' => '{"message":"Invalid request.\\n\\nNo subschema in \\"oneOf\\" matched.","documentation_url":" https://developer.github.com/enterprise/2.2/v3/pulls/comments/#create-a-comment "}', '_rc' => '422', '_headers' => bless( { 'x-github-request-id' => '1513e773-63d0-4952-8e2e-b0213f75bc3d', 'access-control-allow-credentials' => 'true', 'client-response-num' => 5, 'access-control-allow-origin' => '*', 'status' => '422 Unprocessable Entity', 'date' => 'Tue, 28 Jul 2015 16:26:09 GMT', 'client-peer' => '19.86.102.161:80', 'content-length' => '170', 'access-control-expose-headers' => 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval', 'client-date' => 'Tue, 28 Jul 2015 16:25:58 GMT', 'content-type' => 'application/json; charset=utf-8', 'x-frame-options' => 'deny', 'x-xss-protection' => '1; mode=block', 'x-content-type-options' => 'nosniff', 'content-security-policy' => 'default-src \'none\'', 'server' => 'GitHub.com', 'x-github-media-type' => 'github.v3; format=json' }, 'HTTP::Headers' ), '_msg' => 'Unprocessable Entity', '_request' => bless( { '_content' => '{"body":"Dude I Did it"}', '_uri' => bless( do{\(my $o = ' http://fmc05955.fsillab.ford.com/api/v3/repos/Magellan/msbtest/pulls/8/comments')}, 'URI::http' ), '_headers' => bless( { 'user-agent' => 'perl-net-github/0.76', 'accept-encoding' => 'gzip, x-gzip, deflate, x-bzip2', 'content-length' => 24, 'authorization' => 'Basic bWJsYWNrODg6QW8qZW91VDROYQ== ' }, 'HTTP::Headers' ), '_method' => 'POST', '_uri_canonical' => $VAR1->{'_request'}{'_uri'} }, 'HTTP::Request' ) }, 'HTTP::Response' );
Actually it's changed from the API. https://developer.github.com/enterprise/2.2/v3/pulls/comments/#create-a-comment now you need pass the commit_id, path, position or in_reply_to so sample code should be updated as my $comment = $pull->create_comment(66,{ "body"=> "Dude I Did it", commit_id => '586fe4be94c32248043b344e99fa15c72b40d1c2', path => 'test', position => 1, }); sample result: https://github.com/fayland/perl-net-github/pull/66 I have updated the POD. ty