Class GitHubRepository<T extends GitHubRepository>
- java.lang.Object
-
- com.github.kostyasha.github.integration.generic.GitHubRepository<T>
-
- All Implemented Interfaces:
Action
,ModelObject
,Saveable
- Direct Known Subclasses:
GitHubBranchRepository
,GitHubPRRepository
,GitHubTagRepository
public abstract class GitHubRepository<T extends GitHubRepository> extends Object implements Action, Saveable
Action as storage of critical (and not) information required for triggering decision.- Author:
- Kanstantsin Shautsou
-
-
Constructor Summary
Constructors Constructor Description GitHubRepository(String repoFullName, URL githubUrl)
GitHubRepository(org.kohsuke.github.GHRepository ghRepository)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
actualise(org.kohsuke.github.GHRepository ghRepository, TaskListener listener)
Repository may be created without gh connection, but trigger logic expects this fields.protected abstract void
actualiseOnChange(org.kohsuke.github.GHRepository ghRepository, TaskListener listener)
abstract FormValidation
doBuild(org.kohsuke.stapler.StaplerRequest req)
Build using local PR state.abstract FormValidation
doClearRepo()
abstract FormValidation
doRebuild(org.kohsuke.stapler.StaplerRequest req)
Rebuild latest built build.abstract FormValidation
doRebuildAllFailed()
abstract FormValidation
doRunTrigger()
XmlFile
getConfigFile()
String
getFullName()
URL
getGithubUrl()
String
getGitUrl()
Job<?,?>
getJob()
String
getSshUrl()
void
save()
void
saveQuietly()
void
setConfigFile(XmlFile configFile)
void
setJob(Job<?,?> job)
GitHubRepository<T>
withFullName(String fullName)
GitHubRepository<T>
withGithubUrl(URL githubUrl)
GitHubRepository<T>
withGitUrl(String gitUrl)
GitHubRepository<T>
withSshUrl(String sshUrl)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Constructor Detail
-
GitHubRepository
public GitHubRepository(@NonNull org.kohsuke.github.GHRepository ghRepository) throws IOException
- Throws:
IOException
-
-
Method Detail
-
actualise
public void actualise(@NonNull org.kohsuke.github.GHRepository ghRepository, @NonNull TaskListener listener) throws IOException
Repository may be created without gh connection, but trigger logic expects this fields. Should be called before trigger logic starts checks.- Throws:
IOException
-
actualiseOnChange
protected abstract void actualiseOnChange(@NonNull org.kohsuke.github.GHRepository ghRepository, @NonNull TaskListener listener)
-
getFullName
public String getFullName()
-
withFullName
public GitHubRepository<T> withFullName(String fullName)
-
getGithubUrl
public URL getGithubUrl()
-
withGithubUrl
public GitHubRepository<T> withGithubUrl(URL githubUrl)
-
getGitUrl
public String getGitUrl()
-
withGitUrl
public GitHubRepository<T> withGitUrl(String gitUrl)
-
getSshUrl
public String getSshUrl()
-
withSshUrl
public GitHubRepository<T> withSshUrl(String sshUrl)
-
getJob
public Job<?,?> getJob()
-
setJob
public void setJob(Job<?,?> job)
-
getConfigFile
public XmlFile getConfigFile()
-
setConfigFile
public void setConfigFile(XmlFile configFile)
-
saveQuietly
public void saveQuietly()
-
save
public void save() throws IOException
- Specified by:
save
in interfaceSaveable
- Throws:
IOException
-
doClearRepo
public abstract FormValidation doClearRepo() throws IOException
- Throws:
IOException
-
doRunTrigger
public abstract FormValidation doRunTrigger() throws IOException
- Throws:
IOException
-
doRebuildAllFailed
public abstract FormValidation doRebuildAllFailed() throws IOException
- Throws:
IOException
-
doBuild
public abstract FormValidation doBuild(org.kohsuke.stapler.StaplerRequest req) throws IOException
Build using local PR state.- Throws:
IOException
-
doRebuild
public abstract FormValidation doRebuild(org.kohsuke.stapler.StaplerRequest req) throws IOException
Rebuild latest built build. Actions copied.- Throws:
IOException
-
-