Package io.jenkins.plugins.checks.github
Class GitHubChecksContext
java.lang.Object
io.jenkins.plugins.checks.github.GitHubChecksContext
Base class for a context that publishes GitHub checks.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedGitHubChecksContext(Job<?, ?> job, String url, SCMFacade scmFacade) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.cloudbees.plugins.credentials.common.StandardUsernameCredentialsReturns the credentials to access the remote GitHub repository.protected abstract Stringprotected com.cloudbees.plugins.credentials.common.StandardUsernameCredentialsgetGitHubAppCredentials(String credentialsId) abstract StringReturns the commit sha of the run.Returns the id of aGitHubChecksActionfor this run, if any.protected Job<?,?> getJob()abstract StringReturns the source repository's full name of the run.getRun()protected final 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- 
GitHubChecksContext
 
- 
- 
Method Details- 
getHeadShaReturns the commit sha of the run.- Returns:
- the commit sha of the run
 
- 
getRepositoryReturns 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
 
- 
isValidpublic 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
- 
getCredentialspublic com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentials()Returns the credentials to access the remote GitHub repository.- Returns:
- the credentials
 
- 
getURLReturns 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
- 
getGitHubAppCredentialsprotected com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getGitHubAppCredentials(String credentialsId) 
- 
hasGitHubAppCredentialsprotected boolean hasGitHubAppCredentials()
- 
hasCredentialsIdprotected boolean hasCredentialsId()
- 
hasValidCredentialsprotected boolean hasValidCredentials(edu.hm.hafner.util.FilteredLog logger) 
- 
getIdReturns the id of aGitHubChecksActionfor this run, if any.- Parameters:
- name- the name of the check
- Returns:
- the id of the check run
 
- 
getRun
 
-