Package org.kohsuke.github
Class GHRepository.Setter
- java.lang.Object
-
- org.kohsuke.github.GHRepository.Setter
-
- Enclosing class:
- GHRepository
@BetaApi @Deprecated public static class GHRepository.Setter extends Object
Deprecated.AGHRepositoryBuilder
that allows multiple properties to be updated per request. Consumer must calldone()
to commit changes.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.kohsuke.github.Requester
requester
protected boolean
updateInPlace
-
Constructor Summary
Constructors Modifier Constructor Description protected
Setter(GHRepository repository)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description S
allowMergeCommit(boolean enabled)
Allow or disallow merging pull requests with a merge commit.S
allowRebaseMerge(boolean enabled)
Allow or disallow rebase-merging pull requests.S
allowSquashMerge(boolean enabled)
Allow or disallow squash-merging pull requests.protected S
continueOrDone()
Deprecated.S
defaultBranch(String branch)
Default repository branchS
deleteBranchOnMerge(boolean enabled)
After pull requests are merged, you can have head branches deleted automatically.S
description(String description)
Description for repositoryGHRepository
done()
Finishes an update, committing changes.S
downloads(boolean enabled)
Enables downloadsS
homepage(String homepage)
Homepage for repositoryS
homepage(URL homepage)
Homepage for repositoryS
issues(boolean enabled)
Enables issue trackerS
isTemplate(boolean enabled)
Deprecated.S
private_(boolean enabled)
Sets the repository to privateS
projects(boolean enabled)
Enables projectsS
visibility(GHRepository.Visibility visibility)
Sets the repository visibilityS
wiki(boolean enabled)
Enables wikiprotected S
with(String name, Object value)
Deprecated.
-
-
-
Field Detail
-
requester
@Nonnull protected final org.kohsuke.github.Requester requester
-
updateInPlace
protected boolean updateInPlace
-
-
Constructor Detail
-
Setter
protected Setter(@Nonnull GHRepository repository)
Deprecated.
-
-
Method Detail
-
allowSquashMerge
public S allowSquashMerge(boolean enabled) throws IOException
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
public S allowMergeCommit(boolean enabled) throws IOException
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
public S allowRebaseMerge(boolean enabled) throws IOException
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.
-
deleteBranchOnMerge
public S deleteBranchOnMerge(boolean enabled) throws IOException
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
public S defaultBranch(String branch) throws IOException
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
public S description(String description) throws IOException
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
public S homepage(URL homepage) throws IOException
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
public S homepage(String homepage) throws IOException
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_
public S private_(boolean enabled) throws IOException
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
public S visibility(GHRepository.Visibility visibility) throws IOException
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
public S issues(boolean enabled) throws IOException
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
public S projects(boolean enabled) throws IOException
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
public S wiki(boolean enabled) throws IOException
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
public S downloads(boolean enabled) throws IOException
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
@Preview(BAPTISTE) @Deprecated public S isTemplate(boolean enabled) throws IOException
Deprecated.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
public GHRepository done() throws IOException
Finishes an update, committing changes. This method may update-in-place or not. Either way it returns the resulting instance.- Returns:
- an instance with updated current data
- Throws:
IOException
- if there is an I/O Exception
-
with
@Nonnull @BetaApi @Deprecated protected S with(@Nonnull String name, Object value) throws IOException
Deprecated.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
fromdone()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and calldone()
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
@Nonnull @BetaApi @Deprecated protected S continueOrDone() throws IOException
Deprecated.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
fromdone()
. IfAbstractBuilder
is not the same asAbstractBuilder
, this method will return anAbstractBuilder
and letting the caller batch together multiple changes and calldone()
when they are ready.- Returns:
- either a continuing builder or an updated data record
- Throws:
IOException
- if an I/O error occurs
-
-