public class RepositoryUpdateRequest extends AbstractRepositoryRequest
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.AbstractRepositoryRequest.getName(): The new name for the repository, which may match the old name if only the
forkability of the repository should be updatedAbstractRepositoryRequest.isForkable(): Defaults to true, meaning the repository will be marked as forkable if not
explicitly specifiedAbstractRepositoryRequest.isPublic(): Defaults to false, meaning the repository will not be public if not
explicitly specifiedslug, 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.| Modifier and Type | Class and Description |
|---|---|
static class |
RepositoryUpdateRequest.Builder
Constructs
requests for updating repositories. |
AbstractRepositoryRequest.AbstractBuilder<B extends AbstractRepositoryRequest.AbstractBuilder<B>>| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultBranch()
Retrieves the new default branch that should be set when the repository is updated.
|
int |
getId()
Retrieves the
ID of the repository to update. |
Project |
getProject()
Retrieves the
project the repository should be moved to. |
getDescription, getName, isForkable, isPublic@Nullable public String getDefaultBranch()
null to retain the existing default branchpublic int getId()
ID of the repository to update.Copyright © 2022 Atlassian. All rights reserved.