Class VcsTaskUtils

java.lang.Object
com.atlassian.bamboo.plugins.vcs.task.utils.VcsTaskUtils

public class VcsTaskUtils extends Object
Utility methods for VCS tasks.
  • Method Details

    • getCheckoutDirectory

      @NotNull public static @NotNull File getCheckoutDirectory(@NotNull @NotNull CommonTaskContext taskContext, long repositoryId) throws TaskException
      Returns the checkout directory for the given repository, given task context. For build plans, the checkout directory is stored in the build context. For deployments, such information is not provided, so by best-effort approach this method will return task's working directory.
      Parameters:
      taskContext - task context
      repositoryId - id of repository
      Returns:
      checkout location of repository
      Throws:
      TaskException - on any error
    • appendAffectedCommits

      public static void appendAffectedCommits(long repositoryId, @NotNull @NotNull String revisionId, @NotNull @NotNull CommonTaskContext commonTaskContext)
      Adds information about commit made by task to task context.