public class

RepositoryUpdateRequest

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

Class Overview

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:

  • getId(): The ID of the repository to update. This value will not be changed.
  • getName(): The new name for the repository, which may match the old name if only the forkability of the repository should be updated
The following properties, if not specified, will have defaults applied:
  • isForkable(): Defaults to true, meaning the repository will be marked as forkable if not explicitly specified
  • isPublic(): Defaults to false, meaning the repository will not be public if not explicitly specified
The fork's slug, which is used in URLs (both for the browser and when cloning), will be generated from the provided 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.

Summary

Nested Classes
class RepositoryUpdateRequest.Builder Constructs requests for updating repositories. 
Public Methods
int getId()
Retrieves the ID of the repository to update.
@Nullable Project getProject()
Retrieves the project the repository should be moved to.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.repository.AbstractRepositoryRequest
From class java.lang.Object

Public Methods

public int getId ()

Retrieves the ID of the repository to update.

Returns
  • the repository's ID

@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