Drop use of shadow-cat for draft PRs (#1469)

This commit is contained in:
Steve Kowalik
2020-04-26 10:05:20 +08:00
committed by GitHub
parent e0997b438e
commit 84bb69abff
4 changed files with 3 additions and 7 deletions
-3
View File
@@ -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"
+1 -2
View File
@@ -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