Package com.atlassian.bamboo.vcs.runtime
Interface VcsPullRequestDetector
- All Superinterfaces:
IdentifyingExecutor<VcsPullRequestDetector>
- All Known Implementing Classes:
BitbucketCloudPullRequestDetector
,BitbucketServerPullRequestDetector
,GithubPullRequestDetector
Executor responsible for pull request detection.
Used by server-side.
Implementation should be stateless.
- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull List<VcsPullRequest>
getOpenPullRequests
(@NotNull VcsRepositoryData repositoryData) List
of open pull requests that are discovered in the repository.default boolean
Whether pull requests from forked repositories are handled.default boolean
usePollingForPullRequestDetection
(@NotNull VcsRepositoryData repositoryData) Check if Bamboo needs to actively poll in order to detect new/deleted pull requests for specific repository configuration.Methods inherited from interface com.atlassian.bamboo.vcs.runtime.IdentifyingExecutor
getVcsIdForExecutor
-
Method Details
-
usePollingForPullRequestDetection
default boolean usePollingForPullRequestDetection(@NotNull @NotNull VcsRepositoryData repositoryData) Check if Bamboo needs to actively poll in order to detect new/deleted pull requests for specific repository configuration.- Parameters:
repositoryData
- repository- Returns:
- - true if Bamboo need periodically contact the remote repository in order to update list of known pull requests. - false if repository is capable of detecting pull requests using one of available "push" method, e.g. REST resource, remote event.
-
getOpenPullRequests
@NotNull @NotNull List<VcsPullRequest> getOpenPullRequests(@NotNull @NotNull VcsRepositoryData repositoryData) throws RepositoryException List
of open pull requests that are discovered in the repository. Used for monitoring repositories for new PRs.- Parameters:
repositoryData
- repository- Returns:
List
of open pull requests. May be empty.- Throws:
RepositoryException
-
supportsForkedPullRequests
default boolean supportsForkedPullRequests()Whether pull requests from forked repositories are handled.- Returns:
- - true if detector supports pull requests from forked repositories - false if it does not
-