Class Connector
java.lang.Object
org.jenkinsci.plugins.github_branch_source.Connector
Utilities that could perhaps be moved into
github-api
.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.kohsuke.github.RateLimitHandler
Fail immediately and throw a customized exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic FormValidation
checkScanCredentials
(Item context, String apiUri, String scanCredentialsId) Deprecated.static FormValidation
checkScanCredentials
(Item context, String apiUri, String scanCredentialsId, String repoOwner) Checks the credential ID for use as scan credentials in the supplied context against the supplied API endpoint.static FormValidation
checkScanCredentials
(jenkins.scm.api.SCMSourceOwner context, String apiUri, String scanCredentialsId) Deprecated.static org.kohsuke.github.GitHub
static ListBoxModel
listCheckoutCredentials
(Item context, String apiUri) Populates aListBoxModel
with the checkout credentials appropriate for the supplied context against the supplied API endpoint.static ListBoxModel
listCheckoutCredentials
(jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.static ListBoxModel
listScanCredentials
(Item context, String apiUri) Populates aListBoxModel
with the scan credentials appropriate for the supplied context against the supplied API endpoint.static ListBoxModel
listScanCredentials
(jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.static com.cloudbees.plugins.credentials.common.StandardCredentials
lookupScanCredentials
(Item context, String apiUri, String scanCredentialsId) Deprecated.static com.cloudbees.plugins.credentials.common.StandardCredentials
lookupScanCredentials
(Item context, String apiUri, String scanCredentialsId, String repoOwner) Resolves the specified scan credentials in the specified context for use against the specified API endpoint.static com.cloudbees.plugins.credentials.common.StandardCredentials
lookupScanCredentials
(jenkins.scm.api.SCMSourceOwner context, String apiUri, String scanCredentialsId) Deprecated.static void
release
(org.kohsuke.github.GitHub hub)
-
Field Details
-
CUSTOMIZED
public static final org.kohsuke.github.RateLimitHandler CUSTOMIZEDFail immediately and throw a customized exception.
-
-
Method Details
-
listScanCredentials
@NonNull @Deprecated public static ListBoxModel listScanCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.Retained for binary compatibility only.- Parameters:
context
- the context.apiUri
- the api endpoint.- Returns:
- a
ListBoxModel
.
-
listScanCredentials
Populates aListBoxModel
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) Deprecated.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) Deprecated.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) Deprecated.Retained for binary compatibility only.- Parameters:
context
- the context.apiUri
- the API endpoint.scanCredentialsId
- the credentials to resolve.- Returns:
- the
StandardCredentials
ornull
-
lookupScanCredentials
@Deprecated @CheckForNull public static com.cloudbees.plugins.credentials.common.StandardCredentials lookupScanCredentials(@CheckForNull Item context, @CheckForNull String apiUri, @CheckForNull String scanCredentialsId) Deprecated.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
ornull
-
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
ornull
-
listCheckoutCredentials
@NonNull public static ListBoxModel listCheckoutCredentials(@CheckForNull jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.Retained for binary compatibility only.- Parameters:
context
- the context.apiUri
- the API endpoint.- Returns:
- the
StandardCredentials
ornull
-
listCheckoutCredentials
@NonNull public static ListBoxModel listCheckoutCredentials(@CheckForNull Item context, String apiUri) Populates aListBoxModel
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)
-
checkScanCredentials(Item, String, String, String)