Class RepositoryUpdateRequest

java.lang.Object
com.atlassian.bitbucket.repository.AbstractRepositoryRequest
com.atlassian.bitbucket.repository.RepositoryUpdateRequest

public class RepositoryUpdateRequest extends AbstractRepositoryRequest
Defines the properties that can be modified when updating a Repository. To reduce backwards compatibility issues as new properties are added over time, instances of this class may only be created using its RepositoryUpdateRequest.Builder.

The following properties are required:

The following properties, if not specified, will have defaults applied: The fork's slug, which is used in URLs (both for the browser and when cloning), will be generated from the provided AbstractRepositoryRequest.getName(). If the new name, or new slug, have already been used by a different repository in the same project, the repository cannot be updated. Additionally, note that changing a repository's name, as it may change the slug, may change every URL for the repository, both URLs used by the browser and the clone URL. As a result, changing a repository's name may be very disruptive and should be carefully considered.
See Also:
  • Method Details

    • getArchived

      @Nullable public Boolean getArchived()
      Retrieves the archive state to be set when the repository is updated. If no value is provided, the archive state will not be updated.
      Returns:
      the archive state, which may be null to retain the existing archive state
      Since:
      8.0
    • getDefaultBranch

      @Nullable public String getDefaultBranch()
      Retrieves the new default branch that should be set when the repository is updated. If no value is provided the default branch will not be updated.
      Returns:
      the default branch name, which may be null to retain the existing default branch
      Since:
      7.5
    • getId

      public int getId()
      Retrieves the ID of the repository to update.
      Returns:
      the repository's ID
    • getProject

      @Nullable public Project getProject()
      Retrieves the project the repository should be moved to.
      Returns:
      the project to move the repository to. If null, leave the repository in the existing project