[github] Add DRAFT PR schema preview to timeline request
authorIvan Semenov <ivan.semenov@jetbrains.com>
Tue, 11 Aug 2020 12:59:10 +0000 (15:59 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 12:16:37 +0000 (12:16 +0000)
Fixes IDEA-246045

GitOrigin-RevId: 593d07c9d7dcdfe531e0517a8f61886ad3948fc3

plugins/github/src/org/jetbrains/plugins/github/api/GHGQLRequests.kt

index b2a7d1506ea5bafe38a2845819f9bad0e7cc6e30..ddb23f9392b4674be67a9e382396bd07da1770b4 100644 (file)
@@ -171,7 +171,9 @@ object GHGQLRequests {
                                               "cursor" to pagination?.afterCursor,
                                               "since" to pagination?.since),
                                         TimelineConnection::class.java,
                                               "cursor" to pagination?.afterCursor,
                                               "since" to pagination?.since),
                                         TimelineConnection::class.java,
-                                        "repository", "pullRequest", "timelineItems")
+                                        "repository", "pullRequest", "timelineItems").apply {
+          acceptMimeType = GHSchemaPreview.PR_DRAFT.mimeType
+        }
       }
 
       private class TimelineConnection(pageInfo: GHGQLPageInfo, nodes: List<GHPRTimelineItem>)
       }
 
       private class TimelineConnection(pageInfo: GHGQLPageInfo, nodes: List<GHPRTimelineItem>)