Class GitHubPRRepository
- java.lang.Object
-
- com.github.kostyasha.github.integration.generic.GitHubRepository<GitHubPRRepository>
-
- org.jenkinsci.plugins.github.pullrequest.GitHubPRRepository
-
- All Implemented Interfaces:
Action
,ModelObject
,Saveable
public class GitHubPRRepository extends GitHubRepository<GitHubPRRepository>
GitHub Repository local state = last trigger run() state. Store only necessary variables.- 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 GitHubPRRepository(String repoFullName, URL githubUrl)
GitHubPRRepository(org.kohsuke.github.GHRepository ghRepository)
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()
Run trigger from web.Map<Integer,List<Run<?,?>>>
getAllPrBuilds()
Searches for all builds performed in the runs of current job.String
getDisplayName()
String
getIconFileName()
Map<Integer,GitHubPRPullRequest>
getPulls()
String
getUrlName()
void
setConfigFile(XmlFile configFile)
void
setJob(Job<?,?> job)
-
Methods inherited from class com.github.kostyasha.github.integration.generic.GitHubRepository
actualise, getConfigFile, getFullName, getGithubUrl, getGitUrl, getJob, getSshUrl, save, saveQuietly, 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
-
GitHubPRRepository
public GitHubPRRepository(@NonNull org.kohsuke.github.GHRepository ghRepository) throws IOException
Object that represent GitHub repository to work with- Parameters:
ghRepository
- remote repository.- Throws:
IOException
-
-
Method Detail
-
getPulls
@NonNull public Map<Integer,GitHubPRPullRequest> getPulls()
-
getAllPrBuilds
@NonNull public Map<Integer,List<Run<?,?>>> getAllPrBuilds()
Searches for all builds performed in the runs of current job.- Returns:
- map with keys - numbers of built PRs and values - lists of related builds.
-
getIconFileName
public String getIconFileName()
-
getDisplayName
public String getDisplayName()
-
getUrlName
public String getUrlName()
-
actualiseOnChange
public void actualiseOnChange(@NonNull org.kohsuke.github.GHRepository ghRepository, @NonNull TaskListener listener)
- Specified by:
actualiseOnChange
in classGitHubRepository<GitHubPRRepository>
-
doClearRepo
public FormValidation doClearRepo() throws IOException
- Specified by:
doClearRepo
in classGitHubRepository<GitHubPRRepository>
- Throws:
IOException
-
doRunTrigger
public FormValidation doRunTrigger()
Run trigger from web.- Specified by:
doRunTrigger
in classGitHubRepository<GitHubPRRepository>
-
doRebuildAllFailed
public FormValidation doRebuildAllFailed() throws IOException
- Specified by:
doRebuildAllFailed
in classGitHubRepository<GitHubPRRepository>
- 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<GitHubPRRepository>
- 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<GitHubPRRepository>
- Throws:
IOException
-
setJob
public void setJob(Job<?,?> job)
- Overrides:
setJob
in classGitHubRepository<GitHubPRRepository>
-
setConfigFile
public void setConfigFile(XmlFile configFile)
- Overrides:
setConfigFile
in classGitHubRepository<GitHubPRRepository>
-
-