public class BitbucketCloudPullRequestDetector extends BitbucketCloudRestApiClient implements VcsPullRequestDetector
bitbucketClientSupplier
Constructor and Description |
---|
BitbucketCloudPullRequestDetector(CredentialsAccessor credentialsAccessor) |
Modifier and Type | Method and Description |
---|---|
@NotNull List<VcsPullRequest> |
getOpenPullRequests(@NotNull VcsRepositoryData repositoryData)
List of open pull requests that are discovered in the repository. |
protected List<PullRequest> |
getPullRequestsByRepository(@NotNull VcsRepositoryData repositoryData,
@Nullable String username,
@Nullable String password) |
@Nullable ContextualVcsId<VcsPullRequestDetector> |
getVcsIdForExecutor(@NotNull VcsRepositoryData vcsRepositoryData)
Returned id has to fulfill the following:
Given two VcsRepositoryData objects A and B, and executor e returning equal ContextualVcsId (in terms of equals()),
for any operation foo() provided by the executor,
the calls e::foo(A) and e::foo(B) should be equivalent.
|
boolean |
supportsForkedPullRequests()
Whether pull requests from forked repositories are handled.
|
boolean |
usePollingForPullRequestDetection(@NotNull VcsRepositoryData repositoryData)
Check if Bamboo needs to actively poll in order to detect new/deleted pull requests
for specific repository configuration.
|
addFilters, getAuthFilter, getLoggingFilter, prepareResourceCall
@Inject public BitbucketCloudPullRequestDetector(CredentialsAccessor credentialsAccessor)
@Nullable public @Nullable ContextualVcsId<VcsPullRequestDetector> getVcsIdForExecutor(@NotNull @NotNull VcsRepositoryData vcsRepositoryData)
IdentifyingExecutor
VcsBranchDetector
. If they also point
to the same branch, they are considered equal in context of VcsChangeDetector
getVcsIdForExecutor
in interface IdentifyingExecutor<VcsPullRequestDetector>
@NotNull public @NotNull List<VcsPullRequest> getOpenPullRequests(@NotNull @NotNull VcsRepositoryData repositoryData) throws RepositoryException
VcsPullRequestDetector
List
of open pull requests that are discovered in the repository. Used for monitoring repositories for new PRs.getOpenPullRequests
in interface VcsPullRequestDetector
repositoryData
- repositoryList
of open pull requests. May be empty.RepositoryException
@VisibleForTesting protected List<PullRequest> getPullRequestsByRepository(@NotNull @NotNull VcsRepositoryData repositoryData, @Nullable @Nullable String username, @Nullable @Nullable String password) throws RepositoryException
RepositoryException
public boolean usePollingForPullRequestDetection(@NotNull @NotNull VcsRepositoryData repositoryData)
VcsPullRequestDetector
usePollingForPullRequestDetection
in interface VcsPullRequestDetector
repositoryData
- repositorypublic boolean supportsForkedPullRequests()
VcsPullRequestDetector
supportsForkedPullRequests
in interface VcsPullRequestDetector
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.