mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Add 'submitted at' to PullRequestReview (#565)
This field is not currently listed in the Github documentation at https://developer.github.com/v3/pulls/reviews/, but it's been included since Github 2.9 (It even exists in the test data returned for the original PullRequestReview PR)
This commit is contained in:
@@ -95,6 +95,14 @@ class PullRequestReview(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._pull_request_url)
|
||||
return self._pull_request_url.value
|
||||
|
||||
@property
|
||||
def submitted_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._submitted_at)
|
||||
return self._submitted_at.value
|
||||
|
||||
def _initAttributes(self):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._user = github.GithubObject.NotSet
|
||||
@@ -103,6 +111,7 @@ class PullRequestReview(github.GithubObject.CompletableGithubObject):
|
||||
self._state = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._pull_request_url = github.GithubObject.NotSet
|
||||
self._submitted_at = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
if "id" in attributes: # pragma no branch
|
||||
@@ -119,3 +128,5 @@ class PullRequestReview(github.GithubObject.CompletableGithubObject):
|
||||
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
||||
if "pull_request_url" in attributes: # pragma no branch
|
||||
self._pull_request_url = self._makeStringAttribute(attributes["pull_request_url"])
|
||||
if "submitted_at" in attributes: # pragma no branch
|
||||
self._submitted_at = self._makeDatetimeAttribute(attributes["submitted_at"])
|
||||
|
||||
Reference in New Issue
Block a user