Package io.jenkins.plugins.checks.gitea
Class GiteaChecksContext
java.lang.Object
io.jenkins.plugins.checks.gitea.GiteaChecksContext
Base class for a context that publishes Gitea checks.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGiteaChecksContext(Job<?, ?> job, String url, SCMFacade scmFacade) -
Method Summary
Modifier and TypeMethodDescriptioncom.cloudbees.plugins.credentials.common.StandardCredentialsReturns the credentials to access the remote Gitea repository.protected abstract Stringprotected com.cloudbees.plugins.credentials.common.StandardCredentialsgetGiteaAppCredentials(String credentialsId) abstract StringReturns the source repository's server URL of the run.abstract StringReturns the commit sha of the run.protected Job<?,?> getJob()abstract StringgetRepo()Returns the source repository's name of the run.abstract StringReturns the source repository's owner name of the run, e.g.abstract StringReturns the source repository's full name of the run.getRun()protected SCMFacadegetURL()Returns the URL of the run's summary page, e.g.protected booleanprotected booleanprotected booleanhasValidCredentials(edu.hm.hafner.util.FilteredLog logger) abstract booleanisValid(edu.hm.hafner.util.FilteredLog logger) Returns whether the context is valid (with all properties functional) to use.
-
Constructor Details
-
GiteaChecksContext
-
-
Method Details
-
getHeadSha
Returns the commit sha of the run.- Returns:
- the commit sha of the run
-
getRepoOwner
Returns the source repository's owner name of the run, e.g. jenkins-ci- Returns:
- the source repository's owner name
-
getRepo
Returns the source repository's name of the run. The name consists of the repository's name, e.g. jenkins- Returns:
- the source repository's name
-
getGiteaServerUrl
Returns the source repository's server URL of the run.- Returns:
- the source repository's server URL
-
getRepository
Returns the source repository's full name of the run. The full name consists of the owner's name and the repository's name, e.g. jenkins-ci/jenkins- Returns:
- the source repository's full name
-
isValid
public abstract boolean isValid(edu.hm.hafner.util.FilteredLog logger) Returns whether the context is valid (with all properties functional) to use.- Parameters:
logger- the filtered logger- Returns:
- whether the context is valid to use
-
getCredentialsId
-
getCredentials
public com.cloudbees.plugins.credentials.common.StandardCredentials getCredentials()Returns the credentials to access the remote Gitea repository.- Returns:
- the credentials
-
getURL
Returns the URL of the run's summary page, e.g. https://ci.jenkins.io/job/Core/job/jenkins/job/master/2000/.- Returns:
- the URL of the summary page
-
getJob
-
getScmFacade
-
getGiteaAppCredentials
protected com.cloudbees.plugins.credentials.common.StandardCredentials getGiteaAppCredentials(String credentialsId) -
hasGiteaAppCredentials
protected boolean hasGiteaAppCredentials() -
hasCredentialsId
protected boolean hasCredentialsId() -
hasValidCredentials
protected boolean hasValidCredentials(edu.hm.hafner.util.FilteredLog logger) -
getRun
-