mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[gitlab] Add supported API versions for requests
GitOrigin-RevId: 8482b229e5a03809119991d1844e9f0979a7941e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
152dd7a5c1
commit
21f192c3fe
@@ -15,6 +15,7 @@ import org.jetbrains.plugins.gitlab.api.dto.GitLabNoteDTO
|
||||
import org.jetbrains.plugins.gitlab.mergerequest.api.dto.GitLabDiffPositionInput
|
||||
import java.net.http.HttpResponse
|
||||
|
||||
@SinceGitLab("12.3")
|
||||
suspend fun GitLabApi.GraphQL.loadMergeRequestDiscussions(project: GitLabProjectCoordinates,
|
||||
mrIid: String,
|
||||
pagination: GraphQLRequestPagination? = null)
|
||||
@@ -32,6 +33,7 @@ suspend fun GitLabApi.GraphQL.loadMergeRequestDiscussions(project: GitLabProject
|
||||
private class DiscussionConnection(pageInfo: GraphQLCursorPageInfoDTO, nodes: List<GitLabDiscussionDTO>)
|
||||
: GraphQLConnectionDTO<GitLabDiscussionDTO>(pageInfo, nodes)
|
||||
|
||||
@SinceGitLab("14.7")
|
||||
suspend fun GitLabApi.GraphQL.loadMergeRequestCommits(
|
||||
project: GitLabProjectCoordinates,
|
||||
mrIid: String,
|
||||
@@ -50,6 +52,7 @@ suspend fun GitLabApi.GraphQL.loadMergeRequestCommits(
|
||||
private class CommitConnection(pageInfo: GraphQLCursorPageInfoDTO, nodes: List<GitLabCommitDTO>)
|
||||
: GraphQLConnectionDTO<GitLabCommitDTO>(pageInfo, nodes)
|
||||
|
||||
@SinceGitLab("13.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.changeMergeRequestDiscussionResolve(
|
||||
discussionId: String,
|
||||
resolved: Boolean
|
||||
@@ -69,6 +72,7 @@ private class ResolveResult(discussion: GitLabDiscussionDTO, errors: List<String
|
||||
override val value = discussion
|
||||
}
|
||||
|
||||
@SinceGitLab("12.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.updateNote(
|
||||
noteId: String,
|
||||
newText: String
|
||||
@@ -83,6 +87,7 @@ suspend fun GitLabApi.GraphQL.updateNote(
|
||||
}
|
||||
}
|
||||
|
||||
@SinceGitLab("12.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.deleteNote(
|
||||
noteId: String
|
||||
): HttpResponse<out GitLabGraphQLMutationResultDTO<Unit>?> {
|
||||
@@ -95,6 +100,7 @@ suspend fun GitLabApi.GraphQL.deleteNote(
|
||||
}
|
||||
}
|
||||
|
||||
@SinceGitLab("12.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.addNote(
|
||||
mergeRequestGid: String,
|
||||
body: String
|
||||
@@ -109,6 +115,7 @@ suspend fun GitLabApi.GraphQL.addNote(
|
||||
}
|
||||
}
|
||||
|
||||
@SinceGitLab("12.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.addDiffNote(
|
||||
mergeRequestGid: String,
|
||||
position: GitLabDiffPositionInput,
|
||||
@@ -132,6 +139,7 @@ private class CreateNoteResult(note: NoteHolder?, errors: List<String>?)
|
||||
|
||||
private class NoteHolder(val discussion: GitLabDiscussionDTO)
|
||||
|
||||
@SinceGitLab("12.1", note = "Different ID type until 13.6, should work")
|
||||
suspend fun GitLabApi.GraphQL.createReplyNote(
|
||||
mergeRequestGid: String,
|
||||
discussionId: String,
|
||||
|
||||
Reference in New Issue
Block a user