Class VcsTaskUtils
java.lang.Object
com.atlassian.bamboo.plugins.vcs.task.utils.VcsTaskUtils
Utility methods for VCS tasks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendAffectedCommits
(long repositoryId, @NotNull String revisionId, @NotNull CommonTaskContext commonTaskContext) Adds information about commit made by task to task context.static @NotNull File
getCheckoutDirectory
(@NotNull CommonTaskContext taskContext, long repositoryId) Returns the checkout directory for the given repository, given task context.
-
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 contextrepositoryId
- 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.
-