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
  • Method Details

    • isFetchBranches

      public final boolean isFetchBranches()
      Returns true if branch details need to be fetched.
      Returns:
      true if branch details need to be fetched.
    • isFetchTags

      public final boolean isFetchTags()
      Returns true if tag details need to be fetched.
      Returns:
      true if tag details need to be fetched.
    • isFetchReleases

      public final boolean isFetchReleases()
      Returns true if release details need to be fetched.
      Returns:
      true if release details need to be fetched.
    • isIncludingPreReleases

      public final boolean isIncludingPreReleases()
    • isFetchPRs

      public final boolean isFetchPRs()
      Returns true if pull request details need to be fetched.
      Returns:
      true if pull request details need to be fetched.
    • isFetchOriginPRs

      public final boolean isFetchOriginPRs()
      Returns true if origin pull request details need to be fetched.
      Returns:
      true if origin pull request details need to be fetched.
    • isFetchForkPRs

      public final boolean isFetchForkPRs()
      Returns true if fork pull request details need to be fetched.
      Returns:
      true if fork pull request details need to be fetched.
    • getOriginPRStrategies

      @NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getOriginPRStrategies()
      Returns the ChangeRequestCheckoutStrategy to create for each origin pull request.
      Returns:
      the ChangeRequestCheckoutStrategy to create for each origin pull request.
    • getForkPRStrategies

      @NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getForkPRStrategies()
      Returns the ChangeRequestCheckoutStrategy to create for each fork pull request.
      Returns:
      the ChangeRequestCheckoutStrategy to create for each fork pull request.
    • getPRStrategies

      @NonNull public final Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> getPRStrategies(boolean fork)
      Returns the ChangeRequestCheckoutStrategy to create for pull requests of the specified type.
      Parameters:
      fork - true to return strategies for the fork pull requests, false for origin pull requests.
      Returns:
      the ChangeRequestCheckoutStrategy to create for each pull request.
    • getPRStrategies

      public final Map<Boolean,Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>> getPRStrategies()
      Returns the ChangeRequestCheckoutStrategy to create for each pull request.
      Returns:
      a map of the 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)
    • getRequestedPullRequestNumbers

      @CheckForNull public final Set<Long> getRequestedPullRequestNumbers()
      Returns requested pull request numbers.
      Returns:
      the requested pull request numbers or null if the request was not scoped to a subset of pull requests.
    • getRequestedOriginBranchNames

      @CheckForNull public final Set<String> getRequestedOriginBranchNames()
      Gets requested origin branch names.
      Returns:
      the requested origin branch names or null if the request was not scoped to a subset of branches.
    • getRequestedTagNames

      @CheckForNull public final Set<String> getRequestedTagNames()
      Gets requested tag names.
      Returns:
      the requested tag names or null if the request was not scoped to a subset of tags.
    • getPullRequests

      @NonNull public Iterable<GiteaPullRequest> 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.
      Returns:
      the details of pull requests, may be limited by getRequestedPullRequestNumbers() or may be empty if not isFetchPRs()
    • setPullRequests

      public void setPullRequests(@CheckForNull Iterable<GiteaPullRequest> pullRequests)
      Provides the requests with the pull request details.
      Parameters:
      pullRequests - the pull request details.
    • getBranches

      @NonNull public final Iterable<GiteaBranch> 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.
      Returns:
      the branch details (may be empty)
    • setBranches

      public final void setBranches(@CheckForNull Iterable<GiteaBranch> branches)
      Provides the requests with the branch details.
      Parameters:
      branches - the branch details.
    • getTags

      @NonNull public final Iterable<GiteaTag> getTags()
      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.
      Returns:
      the branch details (may be empty)
    • setTags

      public final void setTags(@CheckForNull Iterable<GiteaTag> tags)
      Provides the requests with the branch details.
      Parameters:
      tags - the branch details.
    • getReleases

      @NonNull public final Iterable<GiteaRelease> getReleases()
    • setReleases

      public final void setReleases(@CheckForNull Iterable<GiteaRelease> releases)
    • getCollaboratorNames

      public final Set<String> getCollaboratorNames()
      Returns the names of the repository collaborators or null if those details have not been provided yet.
      Returns:
      the names of the repository collaborators or null if those details have not been provided yet.
    • setCollaboratorNames

      public final void setCollaboratorNames(@CheckForNull Set<String> collaboratorNames)
      Provides the request with the names of the repository collaborators.
      Parameters:
      collaboratorNames - the names of the repository collaborators.
    • getConnection

      @CheckForNull public GiteaConnection getConnection()
      Returns the GiteaConnection to use for the request.
      Returns:
      the GiteaConnection to use for the request or null if caller should establish their own.
    • setConnection

      public void setConnection(@CheckForNull GiteaConnection gitHub)
      Provides the GiteaConnection to use for the request.
      Parameters:
      gitHub - GiteaConnection to use for the request.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class jenkins.scm.api.trait.SCMSourceRequest
      Throws:
      IOException