Commit 4a044453 authored by Vamshi Krishna's avatar Vamshi Krishna

MergeRequest.py: Add fix_issues, close_issues, resolve_issues properties

Closes coala/GSoC/GSoC-2018#412 , #136
parent 67a1f34c
Pipeline #23467511 passed with stages
in 36 seconds
......@@ -22,6 +22,9 @@ GH_STATE_TRANSLATION = {Status.ERROR: 'error', Status.FAILED: 'failure',
INV_GH_STATE_TRANSLATION = {'error': Status.ERROR, 'failure': Status.FAILED,
'pending': Status.PENDING,
'success': Status.SUCCESS}
GITHUB_KEYWORD_REGEX = {'fix': r'[Ff]ix(?:e[sd])?',
'close': r'[Cc]lose[sd]?',
'resolve': r'[Rr]esolve[sd]?'}
def get_diff_index(patch, line_nr):
......@@ -386,3 +389,37 @@ class GitHubCommit(GitHubMixin, Commit):
"""
return {GitHubIssue(self._token, repo_name, number)
for number, repo_name in self._get_mentioned_issues()}
@property
def will_fix_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be fixed as stated in
this commit message.
"""
issues = self.get_keywords_issues(GITHUB_KEYWORD_REGEX['fix'],
[self.message])
return {GitHubIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_close_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be closed as stated in
this commit message.
"""
issues = self.get_keywords_issues(GITHUB_KEYWORD_REGEX['close'],
[self.message])
return {GitHubIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_resolve_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be resolved as stated
in this commit message.
"""
issues = self.get_keywords_issues(GITHUB_KEYWORD_REGEX['resolve'],
[self.message])
return {GitHubIssue(self._token, repo_name, number)
for number, repo_name in issues}
......@@ -230,6 +230,32 @@ class GitHubMergeRequest(GitHubIssue, MergeRequest):
return {issue for commit in self.commits
for issue in commit.closes_issues}
@property
def will_fix_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be fixed as stated in
this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_fix_issues}
@property
def will_close_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be closed as stated in
this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_close_issues}
@property
def will_resolve_issues(self) -> Set[GitHubIssue]:
"""
Returns a set of GitHubIssue objects which would be resolved as stated
in this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_resolve_issues}
@property
def mentioned_issues(self) -> Set[GitHubIssue]:
"""
......
......@@ -32,6 +32,9 @@ GL_STATE_TRANSLATION = {
INV_GL_STATE_TRANSLATION = {val: key for key, val
in GL_STATE_TRANSLATION.items()}
GITLAB_KEYWORD_REGEX = {'fix': r'[Ff]ix(?:e[sd]|ing)?',
'close': r'[Cc]los(?:e[sd]?|ing)',
'resolve': r'[Rr]esolv(?:e[sd]?|ing)'}
class GitLabCommit(GitLabMixin, Commit):
......@@ -361,3 +364,36 @@ class GitLabCommit(GitLabMixin, Commit):
issues = self._get_mentioned_issues()
return {GitLabIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_fix_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be fixed as stated in
this commit message.
"""
issues = self.get_keywords_issues(GITLAB_KEYWORD_REGEX['fix'],
[self.message])
return {GitLabIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_close_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be closed as stated in
this commit message.
"""
issues = self.get_keywords_issues(GITLAB_KEYWORD_REGEX['close'],
[self.message])
return {GitLabIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_resolve_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be resolved as stated
in this commit message.
"""
issues = self.get_keywords_issues(GITLAB_KEYWORD_REGEX['resolve'],
[self.message])
return {GitLabIssue(self._token, repo_name, number)
for number, repo_name in issues}
......@@ -221,6 +221,32 @@ class GitLabMergeRequest(GitLabIssue, MergeRequest):
return {GitLabIssue(self._token, repo_name, number)
for number, repo_name in issues}
@property
def will_fix_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be fixed as stated in
this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_fix_issues}
@property
def will_close_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be closed as stated in
this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_close_issues}
@property
def will_resolve_issues(self) -> Set[GitLabIssue]:
"""
Returns a set of GitLabIssue objects which would be resolved as stated
in this pull request.
"""
return {issue for commit in self.commits
for issue in commit.will_resolve_issues}
@property
def author(self) -> GitLabUser:
"""
......
......@@ -291,3 +291,26 @@ class Commit(IGittObject):
Returns a set of Issue objects which are related to the commit.
"""
raise NotImplementedError
@property
def will_fix_issues(self) -> Set[Issue]:
"""
Returns a set of Issue objects which would be fixed as stated in
this commit message.
"""
@property
def will_close_issues(self) -> Set[Issue]:
"""
Returns a set of Issue objects which would be closed as stated in
this commit message.
"""
raise NotImplementedError
@property
def will_resolve_issues(self) -> Set[Issue]:
"""
Returns a set of Issue objects which would be resolved as stated
in this commit message.
"""
raise NotImplementedError
interactions:
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/c0fd4facd43c471b5600e49076089a81522a23f8?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAA+1XW2/bNhT+K4LyWNui7pKBoF4nD9iwyGvgXtylCCiJsuhIlCFSdhLD/32Hstza
xppE7rCnvJGUvu/cDw83Ks+wOlRjlCZWiuPEMmPL1SPbQYhYPnId5PnY023DwIaZempPZWVCbmkC
oKtg5rw3fBF9ylEY3OnhdG6G07Eze3xXfAmui9mn8C4MwkUYxPezxQfjKniXw3/r8HG2ngR5NgnG
+tXij+xqERaTXy4vgTwui4IKdbhRcS2yspIrhgsC0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YzF+CTj5A9xaEhbyuSXnZ4ISyxiDMIz2ik
9FEPKW90ZTS6YW9CsoY3WjMNqtuv238AC3anaXAPAAA=
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Encoding: [gzip]
Content-Security-Policy: [default-src 'none']
Content-Type: [application/json; charset=utf-8]
Date: ['Thu, 07 Jun 2018 15:12:24 GMT']
ETag: [W/"ac8feee04093812f4dc08f3dcb032754"]
Last-Modified: ['Tue, 05 Jun 2018 09:54:33 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [200 OK]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Accepted-OAuth-Scopes: ['']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Media-Type: [github.v3; format=json]
X-GitHub-Request-Id: ['0877:4804:2BF3ED0:5BF1138:5B194B57']
X-OAuth-Scopes: ['admin:gpg_key, admin:org, admin:org_hook, admin:public_key,
admin:repo_hook, gist, notifications, repo, user']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4988']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.064255']
X-XSS-Protection: [1; mode=block]
status: {code: 200, message: OK}
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/4cdeb83fcacd6bf577a31e8b818ecd1d50544b06?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAA+1X227bOBD9FUOvsSNRdxkI6oc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+l7AIuZEKYEgwGthgARq0+0tDScn0Est
4hhAg4jabTtQH3ePF60ZlJn2j4HRvKInT7ra6NVzrvkszBqWJztDm06+tuPlL07kf72D7SCeUvhQ
8/TihNvRHFQyw6qMRr2B1bd6Z6Q3Gt2VZ+298q68u+vFVa/ky1yUvAeqx0vWq9JeW9T11/Xf5vQP
cDIQAAA=
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Encoding: [gzip]
Content-Security-Policy: [default-src 'none']
Content-Type: [application/json; charset=utf-8]
Date: ['Thu, 07 Jun 2018 15:12:25 GMT']
ETag: [W/"cd807880160a3e8ecdce5d1f33ab0b35"]
Last-Modified: ['Fri, 29 Sep 2017 08:59:50 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [200 OK]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Accepted-OAuth-Scopes: ['']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Media-Type: [github.v3; format=json]
X-GitHub-Request-Id: ['0878:4805:3668D76:6AAEF58:5B194B58']
X-OAuth-Scopes: ['admin:gpg_key, admin:org, admin:org_hook, admin:public_key,
admin:repo_hook, gist, notifications, repo, user']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4987']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.055075']
X-XSS-Protection: [1; mode=block]
status: {code: 200, message: OK}
version: 1
interactions:
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
If-None-Match: [W/"ac8feee04093812f4dc08f3dcb032754"]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/c0fd4facd43c471b5600e49076089a81522a23f8?per_page=100
response:
body: {string: ''}
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Security-Policy: [default-src 'none']
Content-Type: [application/octet-stream]
Date: ['Thu, 07 Jun 2018 15:12:27 GMT']
ETag: ['"ac8feee04093812f4dc08f3dcb032754"']
Last-Modified: ['Tue, 05 Jun 2018 09:54:33 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [304 Not Modified]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Request-Id: ['0879:4803:2183799:48EBB8A:5B194B5A']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4987']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.084499']
X-XSS-Protection: [1; mode=block]
status: {code: 304, message: Not Modified}
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
If-None-Match: [W/"cd807880160a3e8ecdce5d1f33ab0b35"]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/4cdeb83fcacd6bf577a31e8b818ecd1d50544b06?per_page=100
response:
body: {string: ''}
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Security-Policy: [default-src 'none']
Content-Type: [application/octet-stream]
Date: ['Thu, 07 Jun 2018 15:12:29 GMT']
ETag: ['"cd807880160a3e8ecdce5d1f33ab0b35"']
Last-Modified: ['Fri, 29 Sep 2017 08:59:50 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [304 Not Modified]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Request-Id: ['087A:4805:366914A:6AAF69E:5B194B5C']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4987']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.074840']
X-XSS-Protection: [1; mode=block]
status: {code: 304, message: Not Modified}
version: 1
interactions:
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
If-None-Match: [W/"ac8feee04093812f4dc08f3dcb032754"]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/c0fd4facd43c471b5600e49076089a81522a23f8?per_page=100
response:
body: {string: ''}
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Security-Policy: [default-src 'none']
Content-Type: [application/octet-stream]
Date: ['Thu, 07 Jun 2018 15:12:31 GMT']
ETag: ['"ac8feee04093812f4dc08f3dcb032754"']
Last-Modified: ['Tue, 05 Jun 2018 09:54:33 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [304 Not Modified]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Request-Id: ['087B:4802:19FE30E:39C4931:5B194B5E']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4987']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.055536']
X-XSS-Protection: [1; mode=block]
status: {code: 304, message: Not Modified}
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
If-None-Match: [W/"cd807880160a3e8ecdce5d1f33ab0b35"]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/commits/4cdeb83fcacd6bf577a31e8b818ecd1d50544b06?per_page=100
response:
body: {string: ''}
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Security-Policy: [default-src 'none']
Content-Type: [application/octet-stream]
Date: ['Thu, 07 Jun 2018 15:12:36 GMT']
ETag: ['"cd807880160a3e8ecdce5d1f33ab0b35"']
Last-Modified: ['Fri, 29 Sep 2017 08:59:50 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [304 Not Modified]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Request-Id: ['087C:4805:3669821:6AB02A8:5B194B62']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4987']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.043878']
X-XSS-Protection: [1; mode=block]
status: {code: 304, message: Not Modified}
version: 1
interactions:
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/pulls/148/commits?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAA+1XW2/aSBT+K5bzSuLx4CtStLtaUilSgVK5F0iqaBiPzVB7jGbG0ATx33vGkDSg
3Tamq33K2/h4vu/cz7FvNraaE7tnU5SlXkZo6nWpF7ozP0CIeTEKAxTFJHJ9jAnuZpHdsUWVsjue
AmjQnwRjHOvZpwINkoE7Sq7QcDHAo3KwnpZjNC3fLKb98cPkYdwdfLp2h4u/1tNk7A/6FA/6uT9J
8m/D5Pp+klw/TBf5JZDTqiy5tnsbm9R6XklzEqRkoO0jKdWcxzHcYiXhBYhmcHsF4hD/mRvRBcDh
dUq0AWDkRucoOEfdxPV7Lu653tTePurQ7L8h9xMU93yv1+025CVTiuRGfcKUtt69t/ojazhKrP7V
26vk6lbcip2P1v7mhRG94d+sMxd5HQtOTJmzbxGRWn8XlYJn8XUpuaAModDRwHvmAiyZc2XtyeBE
ClVZkhXgfGrpCjjChiJ7ZAw71lkc3QojPIvDC+s9U1WxatR5PsRNSwaGP5YEizzKUtfNMOuGrstw
RkMU+i4OZyGOgyCMglkUZhSAtTTZmGu9VD3HIUt+kXM9r2cmH45ky0o5ICjBsnNj/XmtmGz8MGLH
qFXOi9VBkH9P3y5kymlR8wbChL6jVS2gOlHHXjHJM06J5pUwMds9M2iLDBLBOrZkRJlXdi0UzwW8
6djmQHQtIcqiLoqOvST3RUUAZB63v+XZCV7NdVncHcbyWd7+JWM7PScETx2palMmbZ1z9glTEPQf
g6Socm4y8mySmDmGURzEfhQcjrZx8PHzsKCL6/UomfjDJMeGa0U0kceONEKF90VviptWQkO9NPVf
O48K/lhdekCSyz1NM0R/1T6GTjnPTP551p5dzKqiqNaAPrb3sD8PFThPKDBsd+YiP4EBUBun0nMG
4QIXtsZxrnQ7YxrEBqaE0rByDIeCUEuWtjJojwFz1gIs2TQjqSGrZ4pKvjRN3M6wAyQwVTIngj80
46AdEyBNlTZTspVXDQKQbAWV1g66g2wcWCorQu9NKCSjjK8gsCfQHWGBTd8vzQr8AIk3Yeaa3ZG0
NM3XTMfjJfzamP+0OF8b87Ux///GXBJp5ondu3n6NwiQSzHDKYH/A0aCwE/TgEW0ixnxvIB4Kfww
BEEGnX76h9nThn+5sp8vwl98vrxUzfbL9st3jNaYsSYNAAA=
headers:
Access-Control-Allow-Origin: ['*']
Access-Control-Expose-Headers: ['ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit,
X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes,
X-Poll-Interval']
Cache-Control: ['private, max-age=60, s-maxage=60']
Content-Encoding: [gzip]
Content-Security-Policy: [default-src 'none']
Content-Type: [application/json; charset=utf-8]
Date: ['Thu, 07 Jun 2018 15:12:44 GMT']
ETag: [W/"1effbb1360b3265961bc1e8a7fe9a0b7"]
Last-Modified: ['Wed, 06 Jun 2018 08:52:06 GMT']
Referrer-Policy: ['origin-when-cross-origin, strict-origin-when-cross-origin']
Server: [GitHub.com]
Status: [200 OK]
Strict-Transport-Security: [max-age=31536000; includeSubdomains; preload]
Vary: ['Accept, Authorization, Cookie, X-GitHub-OTP']
X-Accepted-OAuth-Scopes: ['']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [deny]
X-GitHub-Media-Type: [github.v3; format=json]
X-GitHub-Request-Id: ['087F:4803:218423D:48ED2AC:5B194B6B']
X-OAuth-Scopes: ['admin:gpg_key, admin:org, admin:org_hook, admin:public_key,
admin:repo_hook, gist, notifications, repo, user']
X-RateLimit-Limit: ['5000']
X-RateLimit-Remaining: ['4986']
X-RateLimit-Reset: ['1528385735']
X-Runtime-rack: ['0.067776']
X-XSS-Protection: [1; mode=block]
status: {code: 200, message: OK}
- request:
body: '{}'
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Connection: [keep-alive]
Content-Length: ['2']
Content-Type: [application/json]
User-Agent: [IGitt]
method: GET
uri: https://api.github.com/repos/gitmate-test-user/test/pulls/120/commits?per_page=100
response:
body:
string: !!binary |
H4sIAAAAAAAAA+1WbW/aMBD+L/k6aOK8kSBV2weqrpNIhUTHSlUhx3aC27wg26GjiP++c4B20KGV
8GHS1G9JnHvu7rm7x3e3NOQUG13DJZTFgZMQTKgfJ16ngx3EgjhAASMUUc/yXDe2fKNlFCVlE07B
qN+79Qd2qOJRZkW9RxQNUycaXvjRZfQ4Hl25fXv8cDuKHqP8Wx4NiXM77P8cD6f8unfhjuF7fzRA
/d6NFV1ePUXp+TmAkzLPuTK6SwNXaloK/VTgnIG3lKscK9ZWTKp2JZlo22DAcswzOHUsxw1DFHz6
w29f9N/yrCgFm2WLM/hjWsVn4ArsKUCCuW2hTtsK23Y4tIKuF3Y9a2ystvEo9s8DyZmUONWhfmVZ
VkLkSjB43RYQU0wcim0UBBhZJKF2HLiJF9IgxojYsWNRErpxAoaV0IRNlZrJrmniGf+NERMoKqX5
hkRTs64/m9qtNN/tDjg8zd+6I6R5RIdqE1aoCSmrAnrJahlzJnjCCVa8LDRn63cGTZzgTLKWIRiW
+sioCsnTAk5ahn7AqhLAclFlWcuY4UVWYjDSr6uTMmuQ1VTl2WSXy9dOPlSxtZ8G5Mk9V8e0ybHJ
mZuCSSD9deyzMuW6Im96sZ57LUDbmd/VpIH//UeUkYf+U/954F0PL1wNO8cKi/2c6o/S2fS/VglS
FgpaR4uDWZlbB5/n5xokFRuYWv3+Nkm16LytSx39kbWsbZIS5v4JMPez2B3gg27NF4AXMF6kp4EB
wNIs1ZQBtZDuSpPEpWocYm28BNKkgitGw0mokGC0aZgbcwjyqYD4lrW+1bhVLIngM60IjcPdAQHQ
UqS44M+1zDQGBRA9CLUQN027NgYQNodmboyytl6aM8HnmCw0bYIRxudQj9OQ92AAWC1m+nK7gS7S
1eGKTTDNtQDUCr1/FX+Iw+4a9CEOBzeaw4L4IQ7/jTjMsNBKZ3Tvtgsx8lGMAh97seMi5iE7pB1q