Class GitHubBranchRepository
- java.lang.Object
-
- com.github.kostyasha.github.integration.generic.GitHubRepository<GitHubBranchRepository>
-
- com.github.kostyasha.github.integration.branch.GitHubBranchRepository
-
- All Implemented Interfaces:
Action
,ModelObject
,Saveable
public class GitHubBranchRepository extends GitHubRepository<GitHubBranchRepository>
Store local state of remote branches.- Author:
- Kanstantsin Shautsou
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE
Store constantly changing information in job directory with .runtime.xml tail-
Fields inherited from class com.github.kostyasha.github.integration.generic.GitHubRepository
changed, configFile, job
-
-
Constructor Summary
Constructors Constructor Description GitHubBranchRepository(String repoFullName, URL url)
GitHubBranchRepository(org.kohsuke.github.GHRepository remoteRepository)
Object that represent GitHub repository to work with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actualiseOnChange(org.kohsuke.github.GHRepository ghRepository, TaskListener listener)
FormValidation
doBuild(org.kohsuke.stapler.StaplerRequest req)
Build using local PR state.FormValidation
doClearRepo()
FormValidation
doRebuild(org.kohsuke.stapler.StaplerRequest req)
Rebuild latest built build.FormValidation
doRebuildAllFailed()
FormValidation
doRunTrigger()
Map<String,List<Run<?,?>>>
getAllBranchBuilds()
Searches for all builds performed in the runs of current job.Map<String,GitHubBranch>
getBranches()
String
getDisplayName()
String
getIconFileName()
String
getUrlName()
-
Methods inherited from class com.github.kostyasha.github.integration.generic.GitHubRepository
actualise, getConfigFile, getFullName, getGithubUrl, getGitUrl, getJob, getSshUrl, save, saveQuietly, setConfigFile, setJob, withFullName, withGithubUrl, withGitUrl, withSshUrl
-
-
-
-
Field Detail
-
FILE
public static final String FILE
Store constantly changing information in job directory with .runtime.xml tail
-
-
Constructor Detail
-
GitHubBranchRepository
public GitHubBranchRepository(org.kohsuke.github.GHRepository remoteRepository) throws IOException
Object that represent GitHub repository to work with- Parameters:
remoteRepository
- remote repository full name.- Throws:
IOException
-
-
Method Detail
-
getBranches
@NonNull public Map<String,GitHubBranch> getBranches()
-
actualiseOnChange
public void actualiseOnChange(@NonNull org.kohsuke.github.GHRepository ghRepository, @NonNull TaskListener listener)
- Specified by:
actualiseOnChange
in classGitHubRepository<GitHubBranchRepository>
-
getIconFileName
public String getIconFileName()
-
getDisplayName
public String getDisplayName()
-
getUrlName
public String getUrlName()
-
getAllBranchBuilds
public Map<String,List<Run<?,?>>> getAllBranchBuilds()
Searches for all builds performed in the runs of current job.- Returns:
- map with key - string branch names; value - lists of related builds.
-
doClearRepo
public FormValidation doClearRepo() throws IOException
- Specified by:
doClearRepo
in classGitHubRepository<GitHubBranchRepository>
- Throws:
IOException
-
doRunTrigger
public FormValidation doRunTrigger() throws IOException
- Specified by:
doRunTrigger
in classGitHubRepository<GitHubBranchRepository>
- Throws:
IOException
-
doRebuildAllFailed
public FormValidation doRebuildAllFailed() throws IOException
- Specified by:
doRebuildAllFailed
in classGitHubRepository<GitHubBranchRepository>
- Throws:
IOException
-
doBuild
public FormValidation doBuild(org.kohsuke.stapler.StaplerRequest req) throws IOException
Description copied from class:GitHubRepository
Build using local PR state.- Specified by:
doBuild
in classGitHubRepository<GitHubBranchRepository>
- Throws:
IOException
-
doRebuild
public FormValidation doRebuild(org.kohsuke.stapler.StaplerRequest req) throws IOException
Description copied from class:GitHubRepository
Rebuild latest built build. Actions copied.- Specified by:
doRebuild
in classGitHubRepository<GitHubBranchRepository>
- Throws:
IOException
-
-