Interface VcsPullRequestService
-
- All Known Implementing Classes:
VcsPullRequestServiceImpl
@ExperimentalApi public interface VcsPullRequestService
- Since:
- 6.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
closePullRequest(@NotNull VcsPullRequest pullRequest)
Mark pull request as closed.void
closePullRequestsClosedInRepository(long targetRepositoryId, @NotNull List<VcsPullRequest> openPullRequests)
Synchronize the status of pull requests in DB and in remote repository@NotNull VcsPullRequest
createPullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String sourceBranch, long targetRepositoryId, @NotNull String targetBranch, boolean isOpen)
Create new pull request and save it.@NotNull VcsPullRequest
createPullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String sourceBranch, long targetRepositoryId, @NotNull String targetBranch, boolean isOpen, @NotNull VcsForkDto vcsForkDto)
Create new pull request and save it.@Nullable VcsPullRequest
findByRepositoryAndKey(long targetRepositoryId, @NotNull String pullRequestKey)
Search pull request by pull request key (unique on repository level) and target repository idList<VcsPullRequest>
findOpenByRepository(long targetRepositoryId)
Deprecated.since 8.2void
updatePullRequest(@NotNull VcsPullRequest pullRequest, @Nullable Long sourceRepositoryId, @NotNull String source, @NotNull String target, boolean isOpen)
Modify pull request.void
updatePullRequest(@NotNull VcsPullRequest pullRequest, @Nullable Long sourceRepositoryId, @NotNull String source, @NotNull String target, boolean isOpen, @NotNull VcsForkDto vcsForkDto)
Modify pull request.
-
-
-
Method Detail
-
findByRepositoryAndKey
@Nullable @Nullable VcsPullRequest findByRepositoryAndKey(long targetRepositoryId, @NotNull @NotNull String pullRequestKey)
Search pull request by pull request key (unique on repository level) and target repository id- Parameters:
targetRepositoryId
- target repository idpullRequestKey
- repository-specific pull request key- Returns:
- pull request or null if not found
-
findOpenByRepository
@Deprecated List<VcsPullRequest> findOpenByRepository(long targetRepositoryId)
Deprecated.since 8.2Search open pull requests by target repository and status.- Parameters:
targetRepositoryId
- target repository id- Returns:
- list of pull requests
-
closePullRequest
void closePullRequest(@NotNull @NotNull VcsPullRequest pullRequest)
Mark pull request as closed.- Parameters:
pullRequest
-
-
createPullRequest
@NotNull @NotNull VcsPullRequest createPullRequest(@NotNull @NotNull String pullRequestKey, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String sourceBranch, long targetRepositoryId, @NotNull @NotNull String targetBranch, boolean isOpen)
Create new pull request and save it.- Returns:
- created pull request
-
createPullRequest
@NotNull @NotNull VcsPullRequest createPullRequest(@NotNull @NotNull String pullRequestKey, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String sourceBranch, long targetRepositoryId, @NotNull @NotNull String targetBranch, boolean isOpen, @NotNull @NotNull VcsForkDto vcsForkDto)
Create new pull request and save it. The method should be used when dealing with pull requests from forked repositories.- Returns:
- created pull request
-
updatePullRequest
void updatePullRequest(@NotNull @NotNull VcsPullRequest pullRequest, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, @NotNull @NotNull String target, boolean isOpen)
Modify pull request.
-
updatePullRequest
void updatePullRequest(@NotNull @NotNull VcsPullRequest pullRequest, @Nullable @Nullable Long sourceRepositoryId, @NotNull @NotNull String source, @NotNull @NotNull String target, boolean isOpen, @NotNull @NotNull VcsForkDto vcsForkDto)
Modify pull request. The method should be used when dealing with pull requests from forked repositories.
-
closePullRequestsClosedInRepository
void closePullRequestsClosedInRepository(long targetRepositoryId, @NotNull @NotNull List<VcsPullRequest> openPullRequests)
Synchronize the status of pull requests in DB and in remote repository- Parameters:
targetRepositoryId
-openPullRequests
-
-
-