java.lang.Object
org.kohsuke.github.GHRepository.Updater
- All Implemented Interfaces:
GitHubRequestBuilderDone<GHRepository>
- Enclosing class:
- GHRepository
A
GHRepositoryBuilder
that allows multiple properties to be updated per request.
Consumer must call done()
to commit changes.-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.kohsuke.github.Requester
The requester.protected boolean
The update in place. -
Constructor Summary
ModifierConstructorDescriptionprotected
Updater
(GHRepository repository) Instantiates a new updater. -
Method Summary
Modifier and TypeMethodDescriptionallowForking
(boolean enabled) Allow or disallow private forksallowMergeCommit
(boolean enabled) Allow or disallow merging pull requests with a merge commit.allowRebaseMerge
(boolean enabled) Allow or disallow rebase-merging pull requests.allowSquashMerge
(boolean enabled) Allow or disallow squash-merging pull requests.protected GHRepository.Updater
Chooses whether to return a continuing builder or an updated data record IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromGitHubRequestBuilderDone.done()
.defaultBranch
(String branch) Default repository branch.deleteBranchOnMerge
(boolean enabled) After pull requests are merged, you can have head branches deleted automatically.description
(String description) Description for repository.done()
Done.downloads
(boolean enabled) Enables downloads.Homepage for repository.Homepage for repository.issues
(boolean enabled) Enables issue tracker.isTemplate
(boolean enabled) Specifies whether the repository is a template.private_
(boolean enabled) Sets the repository to private.projects
(boolean enabled) Enables projects.visibility
(GHRepository.Visibility visibility) Sets the repository visibility.wiki
(boolean enabled) Enables wiki.protected GHRepository.Updater
Applies a value to a name for this builder.
-
Field Details
-
requester
@Nonnull protected final org.kohsuke.github.Requester requesterThe requester. -
updateInPlace
protected boolean updateInPlaceThe update in place.
-
-
Constructor Details
-
Updater
Instantiates a new updater.- Parameters:
repository
- the repository
-
-
Method Details
-
allowSquashMerge
Allow or disallow squash-merging pull requests.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
allowMergeCommit
Allow or disallow merging pull requests with a merge commit.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
allowRebaseMerge
Allow or disallow rebase-merging pull requests.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
allowForking
Allow or disallow private forks- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
deleteBranchOnMerge
After pull requests are merged, you can have head branches deleted automatically.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
defaultBranch
Default repository branch.- Parameters:
branch
- branch name- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
description
Description for repository.- Parameters:
description
- description of repository- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
homepage
Homepage for repository.- Parameters:
homepage
- homepage of repository- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
homepage
Homepage for repository.- Parameters:
homepage
- homepage of repository- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
private_
Sets the repository to private.- Parameters:
enabled
- private if true- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
visibility
Sets the repository visibility.- Parameters:
visibility
- visibility of repository- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
issues
Enables issue tracker.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
projects
Enables projects.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
wiki
Enables wiki.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
downloads
Enables downloads.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
isTemplate
Specifies whether the repository is a template.- Parameters:
enabled
- true if enabled- Returns:
- a builder to continue with building
- Throws:
IOException
- In case of any networking error or error from the server.
-
done
Done.- Specified by:
done
in interfaceGitHubRequestBuilderDone<S>
- Returns:
- the GH repository
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
with
@Nonnull @BetaApi protected GHRepository.Updater with(@Nonnull String name, Object value) throws IOException Applies a value to a name for this builder. IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromGitHubRequestBuilderDone.done()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and callGitHubRequestBuilderDone.done()
when they are ready.- Parameters:
name
- the name of the fieldvalue
- the value of the field- Returns:
- either a continuing builder or an updated data record
- Throws:
IOException
- if an I/O error occurs
-
continueOrDone
Chooses whether to return a continuing builder or an updated data record IfAbstractBuilder
is the same asAbstractBuilder
, this method will commit changes after the first value change and return aAbstractBuilder
fromGitHubRequestBuilderDone.done()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and callGitHubRequestBuilderDone.done()
when they are ready.- Returns:
- either a continuing builder or an updated data record
- Throws:
IOException
- if an I/O error occurs
-