java.lang.Object
org.jenkinsci.plugins.github_branch_source.Connector

public class Connector extends Object
Utilities that could perhaps be moved into github-api.
  • Field Details

    • CUSTOMIZED

      public static final org.kohsuke.github.RateLimitHandler CUSTOMIZED
      Fail immediately and throw a customized exception.
  • Method Details

    • listScanCredentials

      @NonNull @Deprecated public static ListBoxModel listScanCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, String apiUri)
      Retained for binary compatibility only.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      Returns:
      a ListBoxModel.
    • listScanCredentials

      @NonNull public static ListBoxModel listScanCredentials(@CheckForNull Item context, String apiUri)
      Populates a ListBoxModel with the scan credentials appropriate for the supplied context against the supplied API endpoint.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      Returns:
      a ListBoxModel.
    • checkScanCredentials

      @Deprecated public static FormValidation checkScanCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, String apiUri, String scanCredentialsId)
      Retained for binary compatibility only.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      scanCredentialsId - the credentials ID.
      Returns:
      the FormValidation results.
    • checkScanCredentials

      @Deprecated public static FormValidation checkScanCredentials(@CheckForNull Item context, String apiUri, String scanCredentialsId)
      Checks the credential ID for use as scan credentials in the supplied context against the supplied API endpoint.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      scanCredentialsId - the credentials ID.
      Returns:
      the FormValidation results.
    • checkScanCredentials

      public static FormValidation checkScanCredentials(@CheckForNull Item context, String apiUri, String scanCredentialsId, @CheckForNull String repoOwner)
      Checks the credential ID for use as scan credentials in the supplied context against the supplied API endpoint.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      scanCredentialsId - the credentials ID.
      repoOwner - the org/user
      Returns:
      the FormValidation results.
    • lookupScanCredentials

      @Deprecated @CheckForNull public static com.cloudbees.plugins.credentials.common.StandardCredentials lookupScanCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, @CheckForNull String apiUri, @CheckForNull String scanCredentialsId)
      Retained for binary compatibility only.
      Parameters:
      context - the context.
      apiUri - the API endpoint.
      scanCredentialsId - the credentials to resolve.
      Returns:
      the StandardCredentials or null
    • lookupScanCredentials

      @Deprecated @CheckForNull public static com.cloudbees.plugins.credentials.common.StandardCredentials lookupScanCredentials(@CheckForNull Item context, @CheckForNull String apiUri, @CheckForNull String scanCredentialsId)
      Resolves the specified scan credentials in the specified context for use against the specified API endpoint.
      Parameters:
      context - the context.
      apiUri - the API endpoint.
      scanCredentialsId - the credentials to resolve.
      Returns:
      the StandardCredentials or null
    • lookupScanCredentials

      @CheckForNull public static com.cloudbees.plugins.credentials.common.StandardCredentials lookupScanCredentials(@CheckForNull Item context, @CheckForNull String apiUri, @CheckForNull String scanCredentialsId, @CheckForNull String repoOwner)
      Resolves the specified scan credentials in the specified context for use against the specified API endpoint.
      Parameters:
      context - the context.
      apiUri - the API endpoint.
      scanCredentialsId - the credentials to resolve.
      repoOwner - the org/user
      Returns:
      the StandardCredentials or null
    • listCheckoutCredentials

      @NonNull public static ListBoxModel listCheckoutCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, String apiUri)
      Retained for binary compatibility only.
      Parameters:
      context - the context.
      apiUri - the API endpoint.
      Returns:
      the StandardCredentials or null
    • listCheckoutCredentials

      @NonNull public static ListBoxModel listCheckoutCredentials(@CheckForNull Item context, String apiUri)
      Populates a ListBoxModel with the checkout credentials appropriate for the supplied context against the supplied API endpoint.
      Parameters:
      context - the context.
      apiUri - the api endpoint.
      Returns:
      a ListBoxModel.
    • connect

      @NonNull public static org.kohsuke.github.GitHub connect(@CheckForNull String apiUri, @CheckForNull com.cloudbees.plugins.credentials.common.StandardCredentials credentials) throws IOException
      Throws:
      IOException
    • release

      public static void release(@CheckForNull org.kohsuke.github.GitHub hub)