Skip to content
Snippets Groups Projects
Commit 0054a3d2 authored by Ian Cordasco's avatar Ian Cordasco
Browse files

Merge pull request #290 from adrianmoisey/0.9.x-review-comment

Add review comment
parents 4ea647ec 5aac0faf
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -179,7 +179,7 @@ class PullRequest(GitHubCore):
#: Review comment URL Template. Expands with ``number``
self.review_comment_url = URITemplate(comments) if comments else None
#: Number of review comments on the pull request
self.review_comments = pull.get('review_comments')
self.review_comments_count = pull.get('review_comments')
#: GitHub.com url for review comments (not a template)
self.review_comments_url = pull.get('review_comments_url')
 
Loading
Loading
@@ -218,6 +218,25 @@ class PullRequest(GitHubCore):
"""
return self.update(self.title, self.body, 'closed')
 
@requires_auth
def create_review_comment(self, body, commit_id, path, position):
"""Create a review comment on this pull request.
All parameters are required by the GitHub API.
:param str body: The comment text itself
:param str commit_id: The SHA of the commit to comment on
:param str path: The relative path of the file to comment on
:param int position: The line index in the diff to comment on.
:returns: The created review comment.
:rtype: :class:`~github3.pulls.ReviewComment`
"""
url = self._build_url('comments', base_url=self._api)
data = {'body': body, 'commit_id': commit_id, 'path': path,
'position': str(position)}
json = self._json(self._post(url, data=data), 201)
return ReviewComment(json, self) if json else None
def diff(self):
"""Return the diff"""
resp = self._get(self._api,
Loading
Loading
@@ -310,6 +329,17 @@ class PullRequest(GitHubCore):
"""
return self.update(self.title, self.body, 'open')
 
def review_comments(self, number=-1, etag=None):
r"""Iterate over the review comments on this pull request.
:param int number: (optional), number of comments to return. Default:
-1 returns all available comments.
:param str etag: (optional), ETag from a previous request to the same
endpoint
:returns: generator of :class:`ReviewComment <ReviewComment>`\ s
"""
url = self._build_url('comments', base_url=self._api)
return self._iter(int(number), url, ReviewComment, etag=etag)
@requires_auth
def update(self, title=None, body=None, state=None):
"""Update this pull request.
Loading
Loading
@@ -374,5 +404,24 @@ class ReviewComment(BaseComment):
#: Original commit SHA
self.original_commit_id = comment.get('original_commit_id')
 
#: API URL for the Pull Request
self.pull_request_url = comment.get('pull_request_url')
def _repr(self):
return '<Review Comment [{0}]>'.format(self.user.login)
@requires_auth
def reply(self, body):
"""Reply to this review comment with a new review comment.
:param str body: The text of the comment.
:returns: The created review comment.
:rtype: :class:`~github3.pulls.ReviewComment`
"""
url = self._build_url('comments', base_url=self.pull_request_url)
index = self._api.rfind('/') + 1
in_reply_to = self._api[index:]
json = self._json(self._post(url, data={
'body': body, 'in_reply_to': in_reply_to
}), 201)
return ReviewComment(json, self) if json else None
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YTZOjNhCG/4qLazyWMeOZXapSm5yS3PawueTiEiAb1QCiJGGXh5r/nrcRGOyt+GOUi8vG6kevWt2iW20gsyCOXsPlaxjOg4qXIoiDnbR5k0SL+hjMg21TFJv+DyN3Jd9L3ZjVMzsbpQ6V0EHcBoXayQqM6VBQaJrV8/JLtJwHfM8t15tGFxiXW1ubmDH30CwctTFCp6qyorKLVJWsYc742/7XFWg73TMIG+DBBauWPccZA2bYhaDclsWFBDd1Z3IxeKuKQh1AuRR9ayJ2siRPdhRZ7T5JgWXLlM0FfIclfZAjpLGPi+qsWmygsRuZEcdgQ7TIHhbW20EW7f9Hy7SoVQdsEpNqWVupqscFnlmDpvSOV/Kdf44GawMISXtcSmcFa7FHLD5u7sxaVmu55+mRXKNFKuQezv4k8sIeRHusKW3/RlCQ66UVG56VlIZbXhjxMQ+66S0GdQ/myLp7o/88zTNx2lVM+P1oc1XNCploro+zrdIziZzVW54iVmcHHCMzhOvsD2n/bJLZ79//2kcQiHFvJyVXM7dz/lkynssh0o09uYpAegIASW/i6MUh+5bhs8+nFKnOE6W5VbcOjesCz0Atm/6kWLKCl17COwBAuVJ+nuwAAEljGnFXaF9feMcxbMifqikTd+TdkzXX0Y4ArdzgnK+E8PLgCdKy4VRGOlRp7ocdGC1z37rd5jsvqWQPTFKoxIuDFyXrIC0zOXfvIbvxVUdUYpxBtdh6SyXGCWq15353MglyQuIlaLH1XjoHBmt7jxa82jV850c9QbDr9Kre8febRcz13BkpQFKFpmXS+B9yI4eUutoB+e7n0hEzQruC5HqZc8MBk8Kmc0FZylt1wXVijzgL+/8BS3F6iabft8uY23KJ0bLxTHaHfk/38W5/6g86WTvO0bcDXiExMFj7S81tTicXpqq5Fj6iewRrE45ia7FYtLngXVldCu2ZwY4AFNdpjqrRR2c7MFD1lNx21fqWZGao3gvFMy/fniAAum300eoI0xir0Yd6CewAU2IpC2GsqvzO2JEyZVfKyq1M7+lYrqfbGaj9ZmSVijkvijmi1spUIo5Ra9MuouAUfh5yBCwD1wCuUykEQtrL61o4Rstcp5lqgUYk23CLBmK1DFdPy+gpjH6EX+P1l3gd/YOVNHV2Nub5KVw+rVY/lut4/RJHIY2pG5NPMG7IC2HC5zha0xCcgH0I4huuGPCJa42f+vtJS0G3BjA0Jh8NfxvN4v+4/+jN0gKxdBH098+5v3wt3TaF1FyVokaZ0N+knFYZ1ccFPJ2h/cpUahbogRmtTL5jaLh8iXDbM6kIUtVU2JBV+HUeHLhF8Yp37/ThUEmcuj6am5uNy9MgtrqhthJPxnNg8vAg3+TYfGIUaTaDmWvj+uleX3FuSq1Vf0NUIW1xA1CLqp9s1OVaSWDIZjKCFjKuo19WJra8KezGldNYR4Y+oFA1xZLQJRZCVxV0hdX3zm5JFGeDTjpB3He01JWwB3SPgxqSMC1c+tWErx//AoMNcx5kEwAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "a8d8e492d6966f0c23dee2eed64c678a", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"be9168b0280eb86a632ad8c59e025808\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4940", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:362D765:544D5532", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Wed, 22 Oct 2014 05:56:31 GMT", "date": "Sun, 26 Oct 2014 20:10:26 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414357215"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2014-10-26T20:10:26"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+1bXW/rNhL9K4L6sou1LUuyY8dI0y12gd0+tdi992WbwqAlyiYiS4JEOfUV7n/fM6Qky3biOGGK3gchSBDT5OFwOPyYM5zKLvPYXtgbKbNi4TgsE6O1kJtyNQrSrZPzLC2cQqy3bCfysvAmjv7WH2V7JyvjuHC8+Y09sEVoLzzfn05mM28AuG28PEbuoF7Cq+FCEUXvBxhRcwiVMRlsDGBUexpcUZT8BOdNmlIAjaqScrviOdQ1vxnYhWSSYwLSjCfoKU6DRw5VRiwu+MCWQsb07Y9ha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MbT8Mre6Cfihpl9oNzpCdozgK9HPVQCiUroA4qKPzwD8948OkA2weePQz3kAgD+JFXCtJc2W/JCJx/Tx3lQvlYW3j98TA+Y0zanBNjN3d8U/O2pEyokhHSqpTZS+y67p7SqO2aR+X//0Ca2XmGt9ZMGZGQ92FYQwy1Ge1U4pMWFQpWOicLPCVvFnPKYdJD0NAPzwb6nxK47h92fJ3fdOdk90rsSiKryu9rPZdz2KlnxiE4LCSTUjAX9ze7bnKir2pyjDZGMttWQIslKaVGuGsaDKGLwuEp/74y7lUC1GXZqhKKg0Yf33dSzO0fLGIs/vFdK9Gq6c8qYNNN2XqvpKNvt3Bbem+8GzSHoEO/VvL6S+vZtzNC1SXcdDR7y7shGL9nkHz7TndTGb8K+jq2NPoE4UrsPZW0iUH0hoxPK1Nmc+Id+jtRMBUeJnPRZZXA2tY8sWhnhawbYNFVZo1clXl4pE8ascyHbZwLqI+0JzTOBtmBJOzo9eQjwPoXy2+ssyhXyX/VzgcMZjlz0sxMXZVRBnVt4KMDCEDnwyDrGJ7x/CPHqpf5IFTd4iImHJhE5Rajw9f90DA4P3EAAAA==", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "6d7de9e645814cac34ea2a8d72ba3141", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"fcf9b69c952193a9a135840c1d2498e8\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4939", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:362D7A2:544D5532", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Sun, 26 Oct 2014 19:17:47 GMT", "date": "Sun, 26 Oct 2014 20:10:26 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414357215"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "recorded_at": "2014-10-26T20:10:26"}, {"request": {"body": {"string": "{\"body\": \"Testing review comments\", \"commit_id\": \"4437428aefdb50913e2acabd0552bd13021dc38f\", \"position\": \"6\", \"path\": \"github3/pulls.py\"}", "encoding": "utf-8"}, "headers": {"Content-Length": "137", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "POST", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "response": {"body": {"string": "{\"url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19383389\",\"id\":19383389,\"diff_hunk\":\"@@ -195,6 +195,25 @@ def close(self):\\n \\\"\\\"\\\"\\n return self.update(self.title, self.body, 'closed')\\n \\n+ @requires_auth\\n+ def create_review_comment(self, body, commit_id, path, position):\\n+ \\\"\\\"\\\"Create a review comment on this pull request.\",\"path\":\"github3/pulls.py\",\"position\":6,\"original_position\":6,\"commit_id\":\"4437428aefdb50913e2acabd0552bd13021dc38f\",\"original_commit_id\":\"4437428aefdb50913e2acabd0552bd13021dc38f\",\"user\":{\"login\":\"sigmavirus24\",\"id\":240830,\"avatar_url\":\"https://avatars.githubusercontent.com/u/240830?v=2\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/sigmavirus24\",\"html_url\":\"https://github.com/sigmavirus24\",\"followers_url\":\"https://api.github.com/users/sigmavirus24/followers\",\"following_url\":\"https://api.github.com/users/sigmavirus24/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/sigmavirus24/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/sigmavirus24/subscriptions\",\"organizations_url\":\"https://api.github.com/users/sigmavirus24/orgs\",\"repos_url\":\"https://api.github.com/users/sigmavirus24/repos\",\"events_url\":\"https://api.github.com/users/sigmavirus24/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/sigmavirus24/received_events\",\"type\":\"User\",\"site_admin\":false},\"body\":\"Testing review comments\",\"created_at\":\"2014-10-26T20:10:26Z\",\"updated_at\":\"2014-10-26T20:10:26Z\",\"html_url\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19383389\",\"pull_request_url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\",\"_links\":{\"self\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19383389\"},\"html\":{\"href\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19383389\"},\"pull_request\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\"}},\"body_html\":\"<p>Testing review comments</p>\",\"body_text\":\"Testing review comments\"}", "encoding": "utf-8"}, "headers": {"content-length": "2139", "vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"716d9f12bb65c27bda6188757c89e7df\"", "location": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19383389", "access-control-allow-credentials": "true", "status": "201 Created", "x-ratelimit-remaining": "4938", "x-github-media-type": "github.v3; param=full; format=json", "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", "x-github-request-id": "48A0B008:2E0E:362D7D4:544D5532", "cache-control": "private, max-age=60, s-maxage=60", "date": "Sun, 26 Oct 2014 20:10:26 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414357215"}, "status": {"message": "Created", "code": 201}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "recorded_at": "2014-10-26T20:10:26"}], "recorded_with": "betamax/0.4.1"}
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YTY+jOBCG/0rEddNxCP0xgzSa2dPu3ubQe9lL5IADVgNGtkmURv3f9y0MgWS0+WjvJUqI6/HrcpWpchvINIijl3D5EobzoOKlCOIgkzZvNtGiPgTzYNsUxbr/w8is5DupG7N6ZCej1L4SOojboFCZrMCYDgWFplk9Lr9Ey3nAd9xyvW50gXG5tbWJGXMPzcJRGyN0oiorKrtIVMka5oy/776tQMt0zyBsgAdnrFr2HGcMmGFngnJbFmcS3NSdydngrSoKtQflXPS1idjRkjzZUWSVfZICy5Ypmwv4Dkv6IEdIY+8X1Vm12EBj1zIljsGGaJHeLay3gyza/4+WaVGrDthsTKJlbaWq7hd4Yg2a0hmv5Dv/HA3WBhCSdr+UzgrWYodYvN/cmbWs1nLHkwO5RotEyB2c/UnkmT2I9lBT2v6NoCDXSyvWPC0pDbe8MOJjHnTTWwzqHsyRdbdG/2map+K4q5jw58HmqpoVcqO5Psy2Ss8kclZveYJYne1xjMwQrrM/pP2z2cx+//nXLoJAjHs7KrmYuZ3zT5LxVA6RruzJRQTSEwBIehMHLw7ZtwyffT4lSHW+UZpbde3QuCzwBNSy6U+KJSt46SW8AwCUK+XnyQ4AkDSmETeF9uWFdxzDhvypmnLjjrxbsuYy2hGglRuc85UQXh48Qlo2nMpIhyrJ/bADo2XuW7fbPPOSSvbAbAq18eLgRck6SMtMzt17yK591RGVGCdQLbbeUolxhFrtud+dTIIckXgJWmy9l86BwdreowWvsoZnftQjBLtOr+qMv18tYi7nzkgBkio0LTeN/yE3ckipqx2Q734uHTEjtCtILpc5VxwwKWw6F5SlvFYXXCb2iJOw/x+wFKfnaPp9vYy5LpcYLRvPZHfo93Qf7/an/qCTteMcfTvgFRIDg7W/1dzmdHJhqppr4SO6R7B2w1FsLRaLNhe8K6tLoT0z2BGA4jrJUTX66GwHBqqektuuWt+SzBTVe6F46uXbIwRAt40+Wh1hGmM1+lAvgR1gSixlIYxVld8ZO1Km7EpZuZXJLR3L5XQ7AbXfjawSMedFMUfUWplIxDFqbdpFFJzCz0OOgGXgGsB1KoVASHt5XQvHaJnrNBMt0Iika27RQKyW4ephGT2E0Wv4NX76Ej9F/2AlTZ2ejHl8CJcPq9Xr8il+eo6jkMbUjcknGDfk+XUVxuEjSDQEJ2AfgviGKwZ84lrjl/5+0lLQrQEMjclHwx+jWfwf9x+9WVIgls6C/vY5d+evpeumkJqrUtQoE/qblOMqo/qwgKdTtF+pSswCPTCjlcl3DA2XzxFueyYVQaKaChuyCr/Ogz23KF7x7p0+HCqJY9dHc3OzdnkaxFY31FbiyXgOTB7u5Zscm0+MIs1mMHNtXD/dywvOTam16m+IKqQtbgBqUfWTjbpcKwkM2UxG0ELGdfTLSsWWN4Vdu3Ia60jRBxSqplgSusRC6KqCrrD63tktieJs0EkniPuOlroSdo/ucVBDEqaFS7+a8OXjX0I8PsFkEwAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "a8d8e492d6966f0c23dee2eed64c678a", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"82c26520019a20d6714efbc128ab3fb9\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4918", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896DBD:544D6EBF", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Wed, 22 Oct 2014 05:56:31 GMT", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2014-10-26T21:59:27"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+1c32/juBH+VwTdS4valiX5V4xcrocWaO/pDu3uSy8Lg5Iom4gsCRLlrFfY/73fkJIs21nHjtLuPQiLBLHM+TgcDinON5wtzSKLzKW5kTLNl5bFUjFaC7kpvJGfbK2Mp0lu5WK9ZTuRFbkzsfS37ijdW2kRRbnlLGbmwBSBuXRcdzqZz50B4LbR6hi5hXoJr4ILRBi+HWBE4lAqZdLfdIBR8jS4PC/4Cc5NllIAtaniYuvxDOZazAZmLpnkmI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fq0nCnddbz4hernHpevL7QeJlUz3teXHPz34UXX0UixrUe3BPNeYSr4aW50VfEO1b2gXKnK2gvAL6e9VAFJKqgDygq//ACzFvr6ABZJ5/fD/VQCwD4k1KJrr001ZIXOnmfPs6T8pWxcP/hfXrAnDY1JcCuz/5dwW8vnVApIZRTrbSTmvfpA5VV3TOD3P/Hx6aw9Qpvra40oCLr0TT8CGEx5NXDIS0uPFTlmHj4MWZexKmOSSdJTyswH80HKuy6t9jDeXHXvZU+oLwrhqqqvqv5XERNr5LlT+g0l0BCy0jQ7/ShqYm6SuYcbYhitK2GFHFaSINq1TAeZBH9Jy/53Bp3o4GSGbZbUGMeGIHIyQrBQ7sE7d7Sukbi/9Y7FX7V3VpFRJZqlKjMdlT9du4bb61/gyWRhIj2ap5fKYX7njN2mKlri/BaFjzU4ZHPXvLR/9GMfx8/O/T6bf869jb6BCJJ7UZUxYnE9YUKTxhTV3fiD/p3ZGZ6cFTYSZ9VRWfd+sijlRO+5oC16PWFmFfqhDHr2sjm2oD6SHtDfW2gebCiHZ6uQPi4r0L17lVVpYd6WH194PBOR2362RsYlwWogXqP4b8ZYEGAmnhUIZu4j0J33iNefYSwv8HFTFw8CSlIMpeTr/8F1tXqP+xAAAA=", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "971af40390ac4398fcdd45c8dab0fbe7", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"4d0782b03e7c121b6f3e065ffa4cb0d5\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4917", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896DEB:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Sun, 26 Oct 2014 21:27:18 GMT", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "recorded_at": "2014-10-26T21:59:27"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments?per_page=100"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA61V0W6bMBT9Fct76KrRAIZQQF1Xab/QvWydkMEmWCVAbZMui/Lvuxdol2Rt1URLpJCYe869nBwf/9jQXtc0pZW1nUldl3dqtlC26vNZ0S5dLbvWuEYtlnyldG9Y6I53g1m3dru+ro0LdUvZWOP6SRAHQZxQhypB06efDhWqLLOqb+6h0c0NufCTuRORT3hhcwIrQpakqFsjPxpZl+fpXUOeXnd0eP9d0NL2uiFYOOs7we0Imllla+mM63kr1g45GyjF2Tmg75pPyHij5UOvtDQZ7201LQ7dtQSmTMuVko/Z9EjDNA4Z2XBN2UwJh3TcVvDZGmVV2+C4Azm+xnG/DmyEk5GPTHykbYitlCEoHNx76KWxM5ALCUGbSdpRVxAY70xNaBo5tNVqoRpeZ3urz4MBg/CSMs/nnl/6eRQUISuKJJEhC4QXFPOYRXl0mTAvB+Znsl18GAaXIYu5LAWwJH4gGS94Lrz5nOXCDzzmiyKIS8D3RmqabmjdwkzQetckkwNY6MWB51C+4pbr7MBpw6KZ3IZsRdtYMNJgvN4dwV9WnxmwLfTEgcai2P0t1yLZvmsBUdllfTDCjtEPpi/bum4fgeVw6P3t8W8j9xkJLcfvqlmcyALIjdvaSoJ28EhbFEIZe/xQA2oDW9eggZHHgPZaiqMHm3Aw1mMDE22GhBgI+9wUWnW4I44fcA8NbK1e8Eb95qexAdoAyRBeRz/hgAK0XGGoHQ0fYRu302rFizVKo2Uh1QrEPpHyAA+Mdt1J2AffcAuC9AqSi4slbsOS10ZuHYqZBRW3EDDgooMcwscbA09k3EIZ8/zwwvcuWHTLvNT3UhZ9h5oxXl+o8VM/TOcx1rx/Wx2eHC6Low9CmaI3BkyT6Z3zAwMSwngIyLf/gvecUNAIJs1q1dwbjCyMdbxWWsL1/559oD1K8gL9K2nzflmAeleXF1qccHqjNtvJMNk4Ob3qrl8xzpXbXYOU6K7Myl/onVcq6fbnH4eJaSRdCAAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "c046d59f93ede9ab52d5ac29f1ed70f7", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"5b3c9a92ca7dec2970eb201f08904089\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4916", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896E1A:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments?per_page=100"}, "recorded_at": "2014-10-26T21:59:28"}, {"request": {"body": {"string": "{\"body\": \"Replying to comments is fun.\", \"in_reply_to\": \"19383389\"}", "encoding": "utf-8"}, "headers": {"Content-Length": "67", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "POST", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "response": {"body": {"string": "{\"url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066\",\"id\":19384066,\"diff_hunk\":\"@@ -195,6 +195,25 @@ def close(self):\\n \\\"\\\"\\\"\\n return self.update(self.title, self.body, 'closed')\\n \\n+ @requires_auth\\n+ def create_review_comment(self, body, commit_id, path, position):\\n+ \\\"\\\"\\\"Create a review comment on this pull request.\",\"path\":\"github3/pulls.py\",\"position\":6,\"original_position\":6,\"commit_id\":\"d09fbb501f1b63c42cc99e423d03c5826b67920b\",\"original_commit_id\":\"4437428aefdb50913e2acabd0552bd13021dc38f\",\"user\":{\"login\":\"sigmavirus24\",\"id\":240830,\"avatar_url\":\"https://avatars.githubusercontent.com/u/240830?v=2\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/sigmavirus24\",\"html_url\":\"https://github.com/sigmavirus24\",\"followers_url\":\"https://api.github.com/users/sigmavirus24/followers\",\"following_url\":\"https://api.github.com/users/sigmavirus24/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/sigmavirus24/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/sigmavirus24/subscriptions\",\"organizations_url\":\"https://api.github.com/users/sigmavirus24/orgs\",\"repos_url\":\"https://api.github.com/users/sigmavirus24/repos\",\"events_url\":\"https://api.github.com/users/sigmavirus24/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/sigmavirus24/received_events\",\"type\":\"User\",\"site_admin\":false},\"body\":\"Replying to comments is fun.\",\"created_at\":\"2014-10-26T21:59:28Z\",\"updated_at\":\"2014-10-26T21:59:28Z\",\"html_url\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19384066\",\"pull_request_url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\",\"_links\":{\"self\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066\"},\"html\":{\"href\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19384066\"},\"pull_request\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\"}},\"body_html\":\"<p>Replying to comments is fun.</p>\",\"body_text\":\"Replying to comments is fun.\"}", "encoding": "utf-8"}, "headers": {"content-length": "2154", "vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"eb1eb4bc45aec86442807cf9b9d7cda7\"", "location": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066", "access-control-allow-credentials": "true", "status": "201 Created", "x-ratelimit-remaining": "4915", "x-github-media-type": "github.v3; param=full; format=json", "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", "x-github-request-id": "48A0B008:2E0E:3896E4D:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "Created", "code": 201}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "recorded_at": "2014-10-26T21:59:28"}], "recorded_with": "betamax/0.4.1"}
{"http_interactions": [{"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA62YTY+jOBCG/0rEddNxCP0xgzSa2dPu3ubQe9lL5IADVgNGtkmURv3f9y0MgWS0+WjvJUqI6/HrcpWpchvINIijl3D5EobzoOKlCOIgkzZvNtGiPgTzYNsUxbr/w8is5DupG7N6ZCej1L4SOojboFCZrMCYDgWFplk9Lr9Ey3nAd9xyvW50gXG5tbWJGXMPzcJRGyN0oiorKrtIVMka5oy/776tQMt0zyBsgAdnrFr2HGcMmGFngnJbFmcS3NSdydngrSoKtQflXPS1idjRkjzZUWSVfZICy5Ypmwv4Dkv6IEdIY+8X1Vm12EBj1zIljsGGaJHeLay3gyza/4+WaVGrDthsTKJlbaWq7hd4Yg2a0hmv5Dv/HA3WBhCSdr+UzgrWYodYvN/cmbWs1nLHkwO5RotEyB2c/UnkmT2I9lBT2v6NoCDXSyvWPC0pDbe8MOJjHnTTWwzqHsyRdbdG/2map+K4q5jw58HmqpoVcqO5Psy2Ss8kclZveYJYne1xjMwQrrM/pP2z2cx+//nXLoJAjHs7KrmYuZ3zT5LxVA6RruzJRQTSEwBIehMHLw7ZtwyffT4lSHW+UZpbde3QuCzwBNSy6U+KJSt46SW8AwCUK+XnyQ4AkDSmETeF9uWFdxzDhvypmnLjjrxbsuYy2hGglRuc85UQXh48Qlo2nMpIhyrJ/bADo2XuW7fbPPOSSvbAbAq18eLgRck6SMtMzt17yK591RGVGCdQLbbeUolxhFrtud+dTIIckXgJWmy9l86BwdreowWvsoZnftQjBLtOr+qMv18tYi7nzkgBkio0LTeN/yE3ckipqx2Q734uHTEjtCtILpc5VxwwKWw6F5SlvFYXXCb2iJOw/x+wFKfnaPp9vYy5LpcYLRvPZHfo93Qf7/an/qCTteMcfTvgFRIDg7W/1dzmdHJhqppr4SO6R7B2w1FsLRaLNhe8K6tLoT0z2BGA4jrJUTX66GwHBqqektuuWt+SzBTVe6F46uXbIwRAt40+Wh1hGmM1+lAvgR1gSixlIYxVld8ZO1Km7EpZuZXJLR3L5XQ7AbXfjawSMedFMUfUWplIxDFqbdpFFJzCz0OOgGXgGsB1KoVASHt5XQvHaJnrNBMt0Iika27RQKyW4ephGT2E0Wv4NX76Ej9F/2AlTZ2ejHl8CJcPq9Xr8il+eo6jkMbUjcknGDfk+XUVxuEjSDQEJ2AfgviGKwZ84lrjl/5+0lLQrQEMjclHwx+jWfwf9x+9WVIgls6C/vY5d+evpeumkJqrUtQoE/qblOMqo/qwgKdTtF+pSswCPTCjlcl3DA2XzxFueyYVQaKaChuyCr/Ogz23KF7x7p0+HCqJY9dHc3OzdnkaxFY31FbiyXgOTB7u5Zscm0+MIs1mMHNtXD/dywvOTam16m+IKqQtbgBqUfWTjbpcKwkM2UxG0ELGdfTLSsWWN4Vdu3Ia60jRBxSqplgSusRC6KqCrrD63tktieJs0EkniPuOlroSdo/ucVBDEqaFS7+a8OXjX0I8PsFkEwAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "a8d8e492d6966f0c23dee2eed64c678a", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"82c26520019a20d6714efbc128ab3fb9\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4918", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896DBD:544D6EBF", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Wed, 22 Oct 2014 05:56:31 GMT", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py"}, "recorded_at": "2014-10-26T21:59:27"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA+1c32/juBH+VwTdS4valiX5V4xcrocWaO/pDu3uSy8Lg5Iom4gsCRLlrFfY/73fkJIs21nHjtLuPQiLBLHM+TgcDinON5wtzSKLzKW5kTLNl5bFUjFaC7kpvJGfbK2Mp0lu5WK9ZTuRFbkzsfS37ijdW2kRRbnlLGbmwBSBuXRcdzqZz50B4LbR6hi5hXoJr4ILRBi+HWBE4lAqZdLfdIBR8jS4PC/4Cc5NllIAtaniYuvxDOZazAZmLpnkmIAk5TF6ihL/icOUIYtyPjClkBF9+3MQGCIWUrDISFmeG2GSGX7GmRTx2sj4TvBnAxO25bHMAVPk1EEJuLWIId+2eD1Zk/HCHQ9MtmOSZaeDUw/zyhUIzU9iCXDlFYXlKOGfdj86Q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hfXrAnDY1JcCuz/5dwW8vnVApIZRTrbSTmvfpA5VV3TOD3P/Hx6aw9Qpvra40oCLr0TT8CGEx5NXDIS0uPFTlmHj4MWZexKmOSSdJTyswH80HKuy6t9jDeXHXvZU+oLwrhqqqvqv5XERNr5LlT+g0l0BCy0jQ7/ShqYm6SuYcbYhitK2GFHFaSINq1TAeZBH9Jy/53Bp3o4GSGbZbUGMeGIHIyQrBQ7sE7d7Sukbi/9Y7FX7V3VpFRJZqlKjMdlT9du4bb61/gyWRhIj2ap5fKYX7njN2mKlri/BaFjzU4ZHPXvLR/9GMfx8/O/T6bf869jb6BCJJ7UZUxYnE9YUKTxhTV3fiD/p3ZGZ6cFTYSZ9VRWfd+sijlRO+5oC16PWFmFfqhDHr2sjm2oD6SHtDfW2gebCiHZ6uQPi4r0L17lVVpYd6WH194PBOR2362RsYlwWogXqP4b8ZYEGAmnhUIZu4j0J33iNefYSwv8HFTFw8CSlIMpeTr/8F1tXqP+xAAAA=", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "971af40390ac4398fcdd45c8dab0fbe7", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"4d0782b03e7c121b6f3e065ffa4cb0d5\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4917", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896DEB:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "last-modified": "Sun, 26 Oct 2014 21:27:18 GMT", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286"}, "recorded_at": "2014-10-26T21:59:27"}, {"request": {"body": {"string": "", "encoding": "utf-8"}, "headers": {"Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "GET", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments?per_page=100"}, "response": {"body": {"string": "", "base64_string": "H4sIAAAAAAAAA61V0W6bMBT9Fct76KrRAIZQQF1Xab/QvWydkMEmWCVAbZMui/Lvuxdol2Rt1URLpJCYe869nBwf/9jQXtc0pZW1nUldl3dqtlC26vNZ0S5dLbvWuEYtlnyldG9Y6I53g1m3dru+ro0LdUvZWOP6SRAHQZxQhypB06efDhWqLLOqb+6h0c0NufCTuRORT3hhcwIrQpakqFsjPxpZl+fpXUOeXnd0eP9d0NL2uiFYOOs7we0Imllla+mM63kr1g45GyjF2Tmg75pPyHij5UOvtDQZ7201LQ7dtQSmTMuVko/Z9EjDNA4Z2XBN2UwJh3TcVvDZGmVV2+C4Azm+xnG/DmyEk5GPTHykbYitlCEoHNx76KWxM5ALCUGbSdpRVxAY70xNaBo5tNVqoRpeZ3urz4MBg/CSMs/nnl/6eRQUISuKJJEhC4QXFPOYRXl0mTAvB+Znsl18GAaXIYu5LAWwJH4gGS94Lrz5nOXCDzzmiyKIS8D3RmqabmjdwkzQetckkwNY6MWB51C+4pbr7MBpw6KZ3IZsRdtYMNJgvN4dwV9WnxmwLfTEgcai2P0t1yLZvmsBUdllfTDCjtEPpi/bum4fgeVw6P3t8W8j9xkJLcfvqlmcyALIjdvaSoJ28EhbFEIZe/xQA2oDW9eggZHHgPZaiqMHm3Aw1mMDE22GhBgI+9wUWnW4I44fcA8NbK1e8Eb95qexAdoAyRBeRz/hgAK0XGGoHQ0fYRu302rFizVKo2Uh1QrEPpHyAA+Mdt1J2AffcAuC9AqSi4slbsOS10ZuHYqZBRW3EDDgooMcwscbA09k3EIZ8/zwwvcuWHTLvNT3UhZ9h5oxXl+o8VM/TOcx1rx/Wx2eHC6Low9CmaI3BkyT6Z3zAwMSwngIyLf/gvecUNAIJs1q1dwbjCyMdbxWWsL1/559oD1K8gL9K2nzflmAeleXF1qccHqjNtvJMNk4Ob3qrl8xzpXbXYOU6K7Myl/onVcq6fbnH4eJaSRdCAAA", "encoding": "utf-8"}, "headers": {"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding", "x-served-by": "c046d59f93ede9ab52d5ac29f1ed70f7", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"5b3c9a92ca7dec2970eb201f08904089\"", "access-control-allow-credentials": "true", "status": "200 OK", "x-ratelimit-remaining": "4916", "x-github-media-type": "github.v3; param=full; format=json", "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", "transfer-encoding": "chunked", "x-github-request-id": "48A0B008:2E0E:3896E1A:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "content-encoding": "gzip", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "OK", "code": 200}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments?per_page=100"}, "recorded_at": "2014-10-26T21:59:28"}, {"request": {"body": {"string": "{\"body\": \"Replying to comments is fun.\", \"in_reply_to\": \"19383389\"}", "encoding": "utf-8"}, "headers": {"Content-Length": "67", "Accept-Encoding": "gzip, deflate", "Accept": "application/vnd.github.v3.full+json", "User-Agent": "github3.py/1.0.0b1", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-Type": "application/json", "Authorization": "Basic <BASIC_AUTH>"}, "method": "POST", "uri": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "response": {"body": {"string": "{\"url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066\",\"id\":19384066,\"diff_hunk\":\"@@ -195,6 +195,25 @@ def close(self):\\n \\\"\\\"\\\"\\n return self.update(self.title, self.body, 'closed')\\n \\n+ @requires_auth\\n+ def create_review_comment(self, body, commit_id, path, position):\\n+ \\\"\\\"\\\"Create a review comment on this pull request.\",\"path\":\"github3/pulls.py\",\"position\":6,\"original_position\":6,\"commit_id\":\"d09fbb501f1b63c42cc99e423d03c5826b67920b\",\"original_commit_id\":\"4437428aefdb50913e2acabd0552bd13021dc38f\",\"user\":{\"login\":\"sigmavirus24\",\"id\":240830,\"avatar_url\":\"https://avatars.githubusercontent.com/u/240830?v=2\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/sigmavirus24\",\"html_url\":\"https://github.com/sigmavirus24\",\"followers_url\":\"https://api.github.com/users/sigmavirus24/followers\",\"following_url\":\"https://api.github.com/users/sigmavirus24/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/sigmavirus24/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/sigmavirus24/subscriptions\",\"organizations_url\":\"https://api.github.com/users/sigmavirus24/orgs\",\"repos_url\":\"https://api.github.com/users/sigmavirus24/repos\",\"events_url\":\"https://api.github.com/users/sigmavirus24/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/sigmavirus24/received_events\",\"type\":\"User\",\"site_admin\":false},\"body\":\"Replying to comments is fun.\",\"created_at\":\"2014-10-26T21:59:28Z\",\"updated_at\":\"2014-10-26T21:59:28Z\",\"html_url\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19384066\",\"pull_request_url\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\",\"_links\":{\"self\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066\"},\"html\":{\"href\":\"https://github.com/sigmavirus24/github3.py/pull/286#discussion_r19384066\"},\"pull_request\":{\"href\":\"https://api.github.com/repos/sigmavirus24/github3.py/pulls/286\"}},\"body_html\":\"<p>Replying to comments is fun.</p>\",\"body_text\":\"Replying to comments is fun.\"}", "encoding": "utf-8"}, "headers": {"content-length": "2154", "vary": "Accept, Authorization, Cookie, X-GitHub-OTP", "x-xss-protection": "1; mode=block", "x-content-type-options": "nosniff", "etag": "\"eb1eb4bc45aec86442807cf9b9d7cda7\"", "location": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/comments/19384066", "access-control-allow-credentials": "true", "status": "201 Created", "x-ratelimit-remaining": "4915", "x-github-media-type": "github.v3; param=full; format=json", "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", "x-github-request-id": "48A0B008:2E0E:3896E4D:544D6EC0", "cache-control": "private, max-age=60, s-maxage=60", "date": "Sun, 26 Oct 2014 21:59:28 GMT", "access-control-allow-origin": "*", "content-security-policy": "default-src 'none'", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "server": "GitHub.com", "x-ratelimit-limit": "5000", "x-frame-options": "deny", "content-type": "application/json; charset=utf-8", "x-ratelimit-reset": "1414364368"}, "status": {"message": "Created", "code": 201}, "url": "https://api.github.com/repos/sigmavirus24/github3.py/pulls/286/comments"}, "recorded_at": "2014-10-26T21:59:28"}], "recorded_with": "betamax/0.4.1"}
\ No newline at end of file
# -*- coding: utf-8 -*-
"""Integration tests for methods implemented on PullRequest."""
import github3
from .helper import IntegrationHelper
class TestPullRequest(IntegrationHelper):
"""PullRequest integration tests."""
def get_pull_request(self, repository='sigmavirus24/github3.py', num=235):
"""Get the pull request we wish to use in this test."""
owner, repo = repository.split('/')
p = self.gh.pull_request(owner, repo, num)
assert isinstance(p, github3.pulls.PullRequest)
return p
def test_create_review_comment(self):
"""Show that a user can create an in-line reveiw comment on a PR."""
self.basic_login()
cassette_name = self.cassette_name('create_review_comment')
with self.recorder.use_cassette(cassette_name):
p = self.get_pull_request(num=286)
comment = p.create_review_comment(
body='Testing review comments',
commit_id='4437428aefdb50913e2acabd0552bd13021dc38f',
path='github3/pulls.py',
position=6
)
assert isinstance(comment, github3.pulls.ReviewComment)
class TestReviewComment(IntegrationHelper):
"""Integration tests for the ReviewComment object."""
def test_reply(self):
"""Show that a user can reply to an existing ReviewComment."""
self.basic_login()
cassette_name = self.cassette_name('reply')
with self.recorder.use_cassette(cassette_name):
p = self.gh.pull_request('sigmavirus24', 'github3.py', 286)
c = next(p.review_comments())
comment = c.reply('Replying to comments is fun.')
assert isinstance(comment, github3.pulls.ReviewComment)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment