Package org.jenkinsci.plugin.gitea
Class GiteaSCMSourceRequest
java.lang.Object
jenkins.scm.api.trait.SCMSourceRequest
org.jenkinsci.plugin.gitea.GiteaSCMSourceRequest
- All Implemented Interfaces:
Closeable,AutoCloseable
public class GiteaSCMSourceRequest
extends jenkins.scm.api.trait.SCMSourceRequest
-
Nested Class Summary
Nested classes/interfaces inherited from class jenkins.scm.api.trait.SCMSourceRequest
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> -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final Iterable<GiteaBranch> Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.Returns the names of the repository collaborators ornullif those details have not been provided yet.Returns theGiteaConnectionto use for the request.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> Returns theChangeRequestCheckoutStrategyto create for each fork pull request.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> Returns theChangeRequestCheckoutStrategyto create for each origin pull request.Returns theChangeRequestCheckoutStrategyto create for each pull request.final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getPRStrategies(boolean fork) Returns theChangeRequestCheckoutStrategyto create for pull requests of the specified type.Returns the pull request details or an empty list if either the request did not specify toisFetchPRs()or if the pull request details have not been provided bysetPullRequests(Iterable)yet.final Iterable<GiteaRelease> Gets requested origin branch names.Returns requested pull request numbers.Gets requested tag names.getTags()Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.final booleanReturnstrueif branch details need to be fetched.final booleanReturnstrueif fork pull request details need to be fetched.final booleanReturnstrueif origin pull request details need to be fetched.final booleanReturnstrueif pull request details need to be fetched.final booleanReturnstrueif release details need to be fetched.final booleanReturnstrueif tag details need to be fetched.final booleanfinal voidsetBranches(Iterable<GiteaBranch> branches) Provides the requests with the branch details.final voidsetCollaboratorNames(Set<String> collaboratorNames) Provides the request with the names of the repository collaborators.voidsetConnection(GiteaConnection gitHub) Provides theGiteaConnectionto use for the request.voidsetPullRequests(Iterable<GiteaPullRequest> pullRequests) Provides the requests with the pull request details.final voidsetReleases(Iterable<GiteaRelease> releases) final voidProvides the requests with the branch details.Methods inherited from class jenkins.scm.api.trait.SCMSourceRequest
getCriteria, isComplete, isExcluded, isTrusted, listener, manage, process, process, process
-
Method Details
-
isFetchBranches
public final boolean isFetchBranches()Returnstrueif branch details need to be fetched.- Returns:
trueif branch details need to be fetched.
-
isFetchTags
public final boolean isFetchTags()Returnstrueif tag details need to be fetched.- Returns:
trueif tag details need to be fetched.
-
isFetchReleases
public final boolean isFetchReleases()Returnstrueif release details need to be fetched.- Returns:
trueif release details need to be fetched.
-
isIncludingPreReleases
public final boolean isIncludingPreReleases() -
isFetchPRs
public final boolean isFetchPRs()Returnstrueif pull request details need to be fetched.- Returns:
trueif pull request details need to be fetched.
-
isFetchOriginPRs
public final boolean isFetchOriginPRs()Returnstrueif origin pull request details need to be fetched.- Returns:
trueif origin pull request details need to be fetched.
-
isFetchForkPRs
public final boolean isFetchForkPRs()Returnstrueif fork pull request details need to be fetched.- Returns:
trueif fork pull request details need to be fetched.
-
getOriginPRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getOriginPRStrategies()Returns theChangeRequestCheckoutStrategyto create for each origin pull request.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each origin pull request.
-
getForkPRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getForkPRStrategies()Returns theChangeRequestCheckoutStrategyto create for each fork pull request.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each fork pull request.
-
getPRStrategies
@NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getPRStrategies(boolean fork) Returns theChangeRequestCheckoutStrategyto create for pull requests of the specified type.- Parameters:
fork-trueto return strategies for the fork pull requests,falsefor origin pull requests.- Returns:
- the
ChangeRequestCheckoutStrategyto create for each pull request.
-
getPRStrategies
public final Map<Boolean,Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> getPRStrategies()Returns theChangeRequestCheckoutStrategyto create for each pull request.- Returns:
- a map of the
ChangeRequestCheckoutStrategyto create for each pull request keyed by whether the strategy applies to forks or not (Boolean.FALSEis the key for origin pull requests)
-
getRequestedPullRequestNumbers
Returns requested pull request numbers.- Returns:
- the requested pull request numbers or
nullif the request was not scoped to a subset of pull requests.
-
getRequestedOriginBranchNames
Gets requested origin branch names.- Returns:
- the requested origin branch names or
nullif the request was not scoped to a subset of branches.
-
getRequestedTagNames
Gets requested tag names.- Returns:
- the requested tag names or
nullif the request was not scoped to a subset of tags.
-
getPullRequests
Returns the pull request details or an empty list if either the request did not specify toisFetchPRs()or if the pull request details have not been provided bysetPullRequests(Iterable)yet.- Returns:
- the details of pull requests, may be limited by
getRequestedPullRequestNumbers()or may be empty if notisFetchPRs()
-
setPullRequests
Provides the requests with the pull request details.- Parameters:
pullRequests- the pull request details.
-
getBranches
Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.- Returns:
- the branch details (may be empty)
-
setBranches
Provides the requests with the branch details.- Parameters:
branches- the branch details.
-
getTags
Returns the branch details or an empty list if either the request did not specify toisFetchBranches()or if the branch details have not been provided bysetBranches(Iterable)yet.- Returns:
- the branch details (may be empty)
-
setTags
Provides the requests with the branch details.- Parameters:
tags- the branch details.
-
getReleases
-
setReleases
-
getCollaboratorNames
Returns the names of the repository collaborators ornullif those details have not been provided yet.- Returns:
- the names of the repository collaborators or
nullif those details have not been provided yet.
-
setCollaboratorNames
Provides the request with the names of the repository collaborators.- Parameters:
collaboratorNames- the names of the repository collaborators.
-
getConnection
Returns theGiteaConnectionto use for the request.- Returns:
- the
GiteaConnectionto use for the request ornullif caller should establish their own.
-
setConnection
Provides theGiteaConnectionto use for the request.- Parameters:
gitHub-GiteaConnectionto use for the request.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classjenkins.scm.api.trait.SCMSourceRequest- Throws:
IOException
-