public class RepositoryForkRequest 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 RepositoryForkRequest.Builder
.
The following property is required:
getParent()
: The repository to forkAbstractRepositoryRequest.getName()
: Defaults to the parent
repository's name
if not explicitly specifiedgetProject()
: Defaults to the forking user's personal project
if not explicitly specifiedAbstractRepositoryRequest.isForkable()
: Defaults to true
, meaning the fork will itself be forkable, if not
explicitly specifiedAbstractRepositoryRequest.isPublic()
: Defaults to false
, meaning the fork will 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()
. Both the name and the generated slug must be unique within the
project
or the fork cannot be created.Modifier and Type | Class and Description |
---|---|
static class |
RepositoryForkRequest.Builder
Constructs
requests for forking repositories. |
AbstractRepositoryRequest.AbstractBuilder<B extends AbstractRepositoryRequest.AbstractBuilder<B>>
Modifier and Type | Method and Description |
---|---|
Repository |
getParent()
Retrieves the repository to be forked.
|
Project |
getProject()
Retrieves the project in which the fork should be created, or
null to create the fork in the current
user's personal project . |
getDescription, getName, isForkable, isPublic
@Nonnull public Repository getParent()
origin
of the new
fork.@Nullable public Project getProject()
null
to create the fork in the current
user's personal project
.null
to use the current user's personal projectCopyright © 2020 Atlassian. All rights reserved.