java.lang.Object
org.kohsuke.github.GHRepositoryForkBuilder
A builder pattern object for creating a fork of a repository.
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates the fork with the specified parameters.defaultBranchOnly
(boolean defaultBranchOnly) Sets whether to fork only the default branch.Sets a custom name for the forked repository.organization
(GHOrganization organization) Specifies the target organization for the fork.
-
Method Details
-
defaultBranchOnly
Sets whether to fork only the default branch.- Parameters:
defaultBranchOnly
- the default branch only- Returns:
- the gh repository fork builder
-
organization
Specifies the target organization for the fork.- Parameters:
organization
- the organization- Returns:
- the gh repository fork builder
-
name
Sets a custom name for the forked repository.- Parameters:
name
- the desired repository name- Returns:
- the builder
-
create
Creates the fork with the specified parameters.- Returns:
- the gh repository
- Throws:
IOException
- the io exception
-