mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Adds get_issue_events to PullRequest object (#1154)
* Adds `get_issue_events` to `PullRequest` object * Add unit test for * Fix PullRequest.get_issue_events unit test Use actual event ids... * Fix missing import on PullRequest. I wish the unit tests would run in Python3... * Add PulReqeust.testGetIssueEvents ReplayData * Updating replay data to use developer's personal credentials.
This commit is contained in:
committed by
Wan Liuyang
parent
828b53b756
commit
acd515aaec
@@ -56,6 +56,8 @@ import github.IssueComment
|
||||
import github.Commit
|
||||
import github.PullRequestReview
|
||||
|
||||
import Consts
|
||||
|
||||
|
||||
class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
@@ -627,6 +629,19 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
None
|
||||
)
|
||||
|
||||
def get_issue_events(self):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/issues/:issue_number/events <http://developer.github.com/v3/issues/events>`_
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
|
||||
"""
|
||||
return github.PaginatedList.PaginatedList(
|
||||
github.IssueEvent.IssueEvent,
|
||||
self._requester,
|
||||
self.issue_url + "/events",
|
||||
None,
|
||||
headers={'Accept': Consts.mediaTypeLockReasonPreview}
|
||||
)
|
||||
|
||||
def get_review(self, id):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/pulls/:number/reviews/:id <https://developer.github.com/v3/pulls/reviews>`_
|
||||
|
||||
Reference in New Issue
Block a user