public class BitbucketSCMSourceRequest extends jenkins.scm.api.trait.SCMSourceRequest
SCMSourceRequest
for bitbucket.jenkins.scm.api.trait.SCMSourceRequest.IntermediateLambda<I>, jenkins.scm.api.trait.SCMSourceRequest.LazyRevisionLambda<H extends jenkins.scm.api.SCMHead,R extends jenkins.scm.api.SCMRevision,I>, jenkins.scm.api.trait.SCMSourceRequest.ProbeLambda<H extends jenkins.scm.api.SCMHead,I>, jenkins.scm.api.trait.SCMSourceRequest.RevisionLambda<H extends jenkins.scm.api.SCMHead,R extends jenkins.scm.api.SCMRevision>, jenkins.scm.api.trait.SCMSourceRequest.Witness<H extends jenkins.scm.api.SCMHead,R extends jenkins.scm.api.SCMRevision>
Modifier | Constructor and Description |
---|---|
protected |
BitbucketSCMSourceRequest(BitbucketSCMSource source,
BitbucketSCMSourceContext context,
TaskListener listener)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Iterable<BitbucketBranch> |
getBranches()
Returns the branch details or an empty list if either the request did not specify to
isFetchBranches()
or if the branch details have not been provided by setBranches(Iterable) yet. |
Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> |
getForkPRStrategies()
Returns the
ChangeRequestCheckoutStrategy to create for each fork pull request. |
Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> |
getOriginPRStrategies()
Returns the
ChangeRequestCheckoutStrategy to create for each origin pull request. |
Map<Boolean,Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> |
getPRStrategies()
Returns the
ChangeRequestCheckoutStrategy to create for each pull request. |
Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> |
getPRStrategies(boolean fork)
Returns the
ChangeRequestCheckoutStrategy to create for pull requests of the specified type. |
BitbucketPullRequest |
getPullRequestById(Integer id)
Retrieves the full details of a pull request.
|
Iterable<BitbucketPullRequest> |
getPullRequests()
Returns the pull request details or an empty list if either the request did not specify to
isFetchPRs()
or if the pull request details have not been provided by setPullRequests(Iterable) yet. |
String |
getRepoOwner()
Returns the
BitbucketSCMSource.getRepoOwner() |
String |
getRepository()
Returns the
BitbucketSCMSource.getRepository() . |
Set<String> |
getRequestedOriginBranchNames()
Gets requested origin branch names.
|
Set<String> |
getRequestedPullRequestNumbers()
Returns requested pull request numbers.
|
Set<String> |
getRequestedTagNames()
Gets requested tag names.
|
Iterable<BitbucketBranch> |
getTags()
Returns the branch details or an empty list if either the request did not specify to
isFetchTags()
or if the tag details have not been provided by setTags(Iterable) yet. |
boolean |
isFetchBranches()
Returns
true if branch details need to be fetched. |
boolean |
isFetchForkPRs()
Returns
true if fork pull request details need to be fetched. |
boolean |
isFetchOriginPRs()
Returns
true if origin pull request details need to be fetched. |
boolean |
isFetchPRs()
Returns
true if pull request details need to be fetched. |
boolean |
isFetchTags()
Returns
true if tag details need to be fetched. |
boolean |
isSkipPublicPRs()
Returns
true if pull requests from public repositories should be skipped. |
void |
setBranches(Iterable<BitbucketBranch> branches)
Provides the requests with the branch details.
|
void |
setPullRequests(Iterable<BitbucketPullRequest> pullRequests)
Provides the requests with the pull request details.
|
void |
setTags(Iterable<BitbucketBranch> tags)
Provides the requests with the tag details.
|
getCriteria, isComplete, isExcluded, isTrusted, listener, manage, process, process, process
protected BitbucketSCMSourceRequest(@NonNull BitbucketSCMSource source, @NonNull BitbucketSCMSourceContext context, @CheckForNull TaskListener listener)
source
- the source.context
- the context.listener
- the listener.public final boolean isFetchBranches()
true
if branch details need to be fetched.true
if branch details need to be fetched.public final boolean isFetchTags()
true
if tag details need to be fetched.true
if tag details need to be fetched.public final boolean isFetchPRs()
true
if pull request details need to be fetched.true
if pull request details need to be fetched.public final boolean isFetchOriginPRs()
true
if origin pull request details need to be fetched.true
if origin pull request details need to be fetched.public final boolean isFetchForkPRs()
true
if fork pull request details need to be fetched.true
if fork pull request details need to be fetched.public final boolean isSkipPublicPRs()
true
if pull requests from public repositories should be skipped.true
if pull requests from public repositories should be skipped.@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getOriginPRStrategies()
ChangeRequestCheckoutStrategy
to create for each origin pull request.ChangeRequestCheckoutStrategy
to create for each origin pull request.@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getForkPRStrategies()
ChangeRequestCheckoutStrategy
to create for each fork pull request.ChangeRequestCheckoutStrategy
to create for each fork pull request.@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getPRStrategies(boolean fork)
ChangeRequestCheckoutStrategy
to create for pull requests of the specified type.fork
- true
to return strategies for the fork pull requests, false
for origin pull requests.ChangeRequestCheckoutStrategy
to create for each pull request.public final Map<Boolean,Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> getPRStrategies()
ChangeRequestCheckoutStrategy
to create for each pull request.ChangeRequestCheckoutStrategy
to create for each pull request keyed by whether the
strategy applies to forks or not (Boolean.FALSE
is the key for origin pull requests)@CheckForNull public final Set<String> getRequestedPullRequestNumbers()
null
if the request was not scoped to a subset of pull
requests.@CheckForNull public final Set<String> getRequestedOriginBranchNames()
null
if the request was not scoped to a subset of branches.@CheckForNull public final Set<String> getRequestedTagNames()
null
if the request was not scoped to a subset of tags.@NonNull public final String getRepoOwner()
BitbucketSCMSource.getRepoOwner()
BitbucketSCMSource.getRepoOwner()
@NonNull public final String getRepository()
BitbucketSCMSource.getRepository()
.BitbucketSCMSource.getRepository()
.public final void setPullRequests(@CheckForNull Iterable<BitbucketPullRequest> pullRequests)
pullRequests
- the pull request details.@NonNull public final Iterable<BitbucketPullRequest> getPullRequests()
isFetchPRs()
or if the pull request details have not been provided by setPullRequests(Iterable)
yet.public final BitbucketPullRequest getPullRequestById(Integer id) throws IOException, InterruptedException
id
- The id of the pull request to retrieve the details about.BitbucketPullRequest
object.IOException
- If the request to retrieve the full details encounters an issue.InterruptedException
- If the request to retrieve the full details is interrupted.public final void setBranches(@CheckForNull Iterable<BitbucketBranch> branches)
branches
- the branch details.@NonNull public final Iterable<BitbucketBranch> getBranches()
isFetchBranches()
or if the branch details have not been provided by setBranches(Iterable)
yet.public final void setTags(@CheckForNull Iterable<BitbucketBranch> tags)
tags
- the tag details.@NonNull public final Iterable<BitbucketBranch> getTags()
isFetchTags()
or if the tag details have not been provided by setTags(Iterable)
yet.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class jenkins.scm.api.trait.SCMSourceRequest
IOException
Copyright © 2016–2022. All rights reserved.