Interface VcsPullRequestService

All Known Implementing Classes:
VcsPullRequestServiceImpl

@ExperimentalApi public interface VcsPullRequestService
Since:
6.0
  • Method Details

    • 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 id
      pullRequestKey - repository-specific pull request key
      Returns:
      pull request or null if not found
    • findOpenByRepository

      @Deprecated List<VcsPullRequest> findOpenByRepository(long targetRepositoryId)
      Deprecated.
      since 8.2
      Search 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 -