Class PublishGitWorkTreeParameters

java.lang.Object
com.atlassian.bitbucket.scm.git.worktree.PublishGitWorkTreeParameters

public class PublishGitWorkTreeParameters extends Object
Describes what ref to update when publishing a GitWorkTree to its Repository, and what RepositoryHookRequest to use when invoking the repository hooks before and after publishing the refs.
Since:
7.14
  • Method Details

    • getAuthor

      @Nullable public com.atlassian.bitbucket.user.Person getAuthor()
      Returns:
      the author to use for publishing. If a published ref update is recorded in a reflog, this author will be recorded in the reflog.
    • getBranch

      @Nonnull public String getBranch()
      Returns:
      the branch to publish the work tree to
    • getExpectedHash

      @Nullable public String getExpectedHash()
      Returns:
      the hash the target branch is expected to be at. If the branch is currently at a different hash, publishing will fail. If equal to 0000000000000000000000000000000000000000, publishing will only succeed if the branch does not yet exist. If null, the target branch will be updated regardless of its current value.
    • getHookInvoker

      @Nonnull public GitWorkTreeRepositoryHookInvoker getHookInvoker()
      Returns:
      the GitWorkTreeRepositoryHookInvoker used to invoke repository hooks before and after publishing the refs from the work tree to the repository
    • getTimeout

      @Nullable public Duration getTimeout()
      Returns:
      an optional timeout to apply to the publishing of refs. If no timeout is provided, the system default is used.