Class CommandContext

java.lang.Object
io.jenkins.updatebot.commands.CommandContext
Direct Known Subclasses:
EnableFabric8Context, PromoteContext, PushRegexChangesContext, PushSourceChangesContext, PushVersionChangesContext

public class CommandContext
extends Object
  • Constructor Details

  • Method Details

    • getConfiguration

      public Configuration getConfiguration()
    • getParentContext

      public CommandContext getParentContext()
    • getChildren

      public List<CommandContext> getChildren()
    • getRepository

      public LocalRepository getRepository()
    • getIssue

      public org.kohsuke.github.GHIssue getIssue()
    • setIssue

      public void setIssue​(org.kohsuke.github.GHIssue issue)
    • getPullRequest

      public org.kohsuke.github.GHPullRequest getPullRequest()
    • setPullRequest

      public void setPullRequest​(org.kohsuke.github.GHPullRequest pullRequest)
    • getRepositoryFullName

      public String getRepositoryFullName()
    • getStatus

      public Status getStatus()
    • setStatus

      public void setStatus​(Status status)
    • isUpdated

      public boolean isUpdated()
      Returns true if one or more files have been updated
    • getUpdatedFiles

      public Set<File> getUpdatedFiles()
    • getCloneUrl

      public String getCloneUrl()
    • getDir

      public File getDir()
    • gitHubRepository

      public org.kohsuke.github.GHRepository gitHubRepository()
      Returns the underlying github repository or null if its not a github repo
    • file

      public File file​(String relativePath)
      Returns the relative file path within the local repo
    • updatedFile

      public void updatedFile​(File file)
    • getGit

      public GitPlugin getGit()
    • updateVersion

      public PushVersionChangesContext updateVersion​(Kind kind, String name, String version)
    • createPullRequestTitle

      public String createPullRequestTitle()
    • createIssueTitlePrefix

      public String createIssueTitlePrefix()
    • createPullRequestTitlePrefix

      public String createPullRequestTitlePrefix()
    • createCommit

      public String createCommit()
    • createPullRequestBody

      public String createPullRequestBody()
    • addChild

      protected void addChild​(CommandContext child)
    • removeChild

      public void removeChild​(CommandContext child)
      Lets remove a child context if it wasn't applicable (to avoid generating unnecessary change comments etc
    • firstChild

      protected CommandContext firstChild()
    • createStatusInfo

      public StatusInfo createStatusInfo()
    • info

      public void info​(org.slf4j.Logger log, String message)
    • warn

      public void warn​(org.slf4j.Logger log, String message)
    • warn

      public void warn​(org.slf4j.Logger log, String message, Throwable e)
    • error

      public void error​(org.slf4j.Logger log, String message)
    • error

      public void error​(org.slf4j.Logger log, String message, Throwable e)