Class GithubScm
java.lang.Object
io.jenkins.blueocean.rest.model.Resource
io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
io.jenkins.blueocean.blueocean_github_pipeline.GithubScm
- All Implemented Interfaces:
io.jenkins.blueocean.rest.Reachable
- Direct Known Subclasses:
GithubEnterpriseScm
public class GithubScm
extends io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
- Author:
- Vivek Pandey
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected final io.jenkins.blueocean.rest.Reachable
Fields inherited from class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
CREDENTIAL_ID, URI, VALIDATE, X_CREDENTIAL_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static HttpURLConnection
protected String
createCredentialId
(String apiUrl) protected String
protected String
getId()
io.jenkins.blueocean.rest.hal.Link
getLink()
io.jenkins.blueocean.rest.model.Container<io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization>
getRepository
(String jobName) io.jenkins.blueocean.rest.impl.pipeline.scm.ScmServerEndpointContainer
getState()
getUri()
boolean
org.kohsuke.stapler.HttpResponse
validateAndCreate
(net.sf.json.JSONObject request) protected void
Ensure any existing access token is valid and has the proper scopes.Methods inherited from class io.jenkins.blueocean.rest.impl.pipeline.scm.AbstractScm
checkPermission, createResponse, getAuthenticatedUser, getCredentialIdFromRequest, getRootOrgFolder
Methods inherited from class io.jenkins.blueocean.rest.model.Resource
getLinks
-
Field Details
-
ID
- See Also:
-
parent
protected final io.jenkins.blueocean.rest.Reachable parent
-
-
Constructor Details
-
GithubScm
public GithubScm(io.jenkins.blueocean.rest.Reachable parent)
-
-
Method Details
-
getLink
public io.jenkins.blueocean.rest.hal.Link getLink() -
getId
- Specified by:
getId
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getUri
- Specified by:
getUri
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getCredentialDomainName
-
getCredentialId
- Specified by:
getCredentialId
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getState
- Overrides:
getState
in classio.jenkins.blueocean.rest.model.Resource
-
getRepository
@GET @WebMethod(name="repository") public GithubRepository getRepository(@QueryParameter String jobName) - Parameters:
jobName
- the job name- Returns:
- GHRepository used by the job
-
getOrganizations
public io.jenkins.blueocean.rest.model.Container<io.jenkins.blueocean.rest.impl.pipeline.scm.ScmOrganization> getOrganizations()- Specified by:
getOrganizations
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
getServers
public io.jenkins.blueocean.rest.impl.pipeline.scm.ScmServerEndpointContainer getServers()- Specified by:
getServers
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
isOrganizationAvatarSupported
public boolean isOrganizationAvatarSupported() -
createCredentialId
-
getCredentialDescription
-
getCustomApiUri
-
validateAndCreate
public org.kohsuke.stapler.HttpResponse validateAndCreate(@JsonBody net.sf.json.JSONObject request) - Specified by:
validateAndCreate
in classio.jenkins.blueocean.rest.impl.pipeline.scm.Scm
-
connect
- Throws:
IOException
-
validateExistingAccessToken
protected void validateExistingAccessToken()Ensure any existing access token is valid and has the proper scopes.
-