Class Connector
java.lang.Object
org.jenkinsci.plugins.github_branch_source.Connector
Utilities that could perhaps be moved into
github-api.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.kohsuke.github.RateLimitHandlerFail immediately and throw a customized exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic FormValidationcheckScanCredentials(Item context, String apiUri, String scanCredentialsId) Deprecated.static FormValidationcheckScanCredentials(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 FormValidationcheckScanCredentials(jenkins.scm.api.SCMSourceOwner context, String apiUri, String scanCredentialsId) Deprecated.static org.kohsuke.github.GitHubstatic ListBoxModellistCheckoutCredentials(Item context, String apiUri) Populates aListBoxModelwith the checkout credentials appropriate for the supplied context against the supplied API endpoint.static ListBoxModellistCheckoutCredentials(jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.static ListBoxModellistScanCredentials(Item context, String apiUri) Populates aListBoxModelwith the scan credentials appropriate for the supplied context against the supplied API endpoint.static ListBoxModellistScanCredentials(jenkins.scm.api.SCMSourceOwner context, String apiUri) Deprecated.static com.cloudbees.plugins.credentials.common.StandardCredentialslookupScanCredentials(Item context, String apiUri, String scanCredentialsId) Deprecated.static com.cloudbees.plugins.credentials.common.StandardCredentialslookupScanCredentials(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.StandardCredentialslookupScanCredentials(jenkins.scm.api.SCMSourceOwner context, String apiUri, String scanCredentialsId) Deprecated.static voidrelease(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 aListBoxModelwith 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
FormValidationresults.
-
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
FormValidationresults.
-
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
FormValidationresults.
-
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
StandardCredentialsornull
-
lookupScanCredentials
@Deprecated @CheckForNull public static com.cloudbees.plugins.credentials.common.StandardCredentials lookupScanCredentials(@CheckForNull Item 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
StandardCredentialsornull
-
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.Callers of this method must not expose the credentials to unprivileged users for uncontrolled usage.
- Parameters:
context- the context.apiUri- the API endpoint.scanCredentialsId- the credentials to resolve.repoOwner- the org/user- Returns:
- the
StandardCredentialsornull
-
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
StandardCredentialsornull
-
listCheckoutCredentials
@NonNull public static ListBoxModel listCheckoutCredentials(@CheckForNull Item context, String apiUri) Populates aListBoxModelwith 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)