mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Drop use of shadow-cat for draft PRs (#1469)
This commit is contained in:
@@ -118,8 +118,5 @@ updateBranchPreview = "application/vnd.github.lydian-preview+json"
|
||||
# https://developer.github.com/changes/2016-05-23-timeline-preview-api/
|
||||
issueTimelineEventsPreview = "application/vnd.github.mockingbird-preview"
|
||||
|
||||
# https://developer.github.com/changes/2019-02-14-draft-pull-requests/
|
||||
draftPullRequestPreview = "application/vnd.github.shadow-cat-preview+json"
|
||||
|
||||
# https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository
|
||||
teamRepositoryPermissions = "application/vnd.github.v3.repository+json"
|
||||
|
||||
@@ -1388,10 +1388,9 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def __create_pull(self, **kwds):
|
||||
post_parameters = kwds
|
||||
import_header = {"Accept": Consts.draftPullRequestPreview}
|
||||
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"POST", self.url + "/pulls", input=post_parameters, headers=import_header
|
||||
"POST", self.url + "/pulls", input=post_parameters
|
||||
)
|
||||
return github.PullRequest.PullRequest(
|
||||
self._requester, headers, data, completed=True
|
||||
|
||||
Reference in New Issue
Block a user