Class 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
    • Constructor Detail

      • GithubScm

        public GithubScm​(io.jenkins.blueocean.rest.Reachable parent)
    • Method Detail

      • getLink

        public io.jenkins.blueocean.rest.hal.Link getLink()
      • getId

        @Nonnull
        public String getId()
        Specified by:
        getId in class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • getUri

        @Nonnull
        public String getUri()
        Specified by:
        getUri in class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • getCredentialDomainName

        public String getCredentialDomainName()
      • getCredentialId

        public String getCredentialId()
        Specified by:
        getCredentialId in class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • getState

        public Object getState()
        Overrides:
        getState in class io.jenkins.blueocean.rest.model.Resource
      • getRepository

        @GET
        @WebMethod(name="repository")
        public GithubRepository getRepository​(@QueryParameter
                                              String jobName,
                                              @QueryParameter
                                              String apiUrl)
        Parameters:
        jobName - the job name
        apiUrl - github api url
        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 class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • getServers

        public io.jenkins.blueocean.rest.impl.pipeline.scm.ScmServerEndpointContainer getServers()
        Specified by:
        getServers in class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • isOrganizationAvatarSupported

        public boolean isOrganizationAvatarSupported()
      • getCredentialDescription

        @Nonnull
        protected String getCredentialDescription()
      • validateAndCreate

        public org.kohsuke.stapler.HttpResponse validateAndCreate​(@JsonBody
                                                                  net.sf.json.JSONObject request)
        Specified by:
        validateAndCreate in class io.jenkins.blueocean.rest.impl.pipeline.scm.Scm
      • validateExistingAccessToken

        protected void validateExistingAccessToken()
        Ensure any existing access token is valid and has the proper scopes.