Interface PullRequestDetectionService

  • All Known Implementing Classes:
    PullRequestDetectionServiceImpl

    public interface PullRequestDetectionService
    A service for detecting new PRs in VCS repositories. This service is responsible for throttling the detection requests.
    Since:
    6.0
    • Method Detail

      • schedulePullRequestDetectionForChain

        boolean schedulePullRequestDetectionForChain​(@NotNull
                                                     @NotNull ImmutableChain chain)
        Registers PR detection request for a given Chain. The PullRequestDetectionService will try to flatten the real PR detection execution density over time.
        Parameters:
        chain - to be detected for pull requests
        Returns:
        false if another detection for this chain is already in progress or in queue
      • getOpenPullRequests

        @NotNull
        @NotNull List<VcsPullRequest> getOpenPullRequests​(@NotNull
                                                          @NotNull ImmutableChain chain,
                                                          @NotNull
                                                          @NotNull VcsRepositoryData planRepositoryDefinition)
                                                   throws Exception
        Returns a list of currently open pull requests for the chain's default repository List ordering determined by underlying repository (preference is for native ordering e.g. last updated first for hg)
        Parameters:
        chain - to find pull requests for.
        Returns:
        a list of currently open pull requests for the chain's default repository
        Throws:
        Exception