public final class GHContentBuilder extends Object
Call various methods to build up parameters, then call commit() to make the change effective.
GHRepository#createContent()| Modifier and Type | Method and Description |
|---|---|
GHContentBuilder |
branch(String branch)
Branch gh content builder.
|
GHContentUpdateResponse |
commit()
Commits a new content.
|
GHContentBuilder |
content(byte[] content)
Content gh content builder.
|
GHContentBuilder |
content(String content)
Content gh content builder.
|
GHContentBuilder |
message(String commitMessage)
Message gh content builder.
|
GHContentBuilder |
path(String path)
Path gh content builder.
|
GHContentBuilder |
sha(String sha)
Used when updating (but not creating a new content) to specify the blob SHA of the file being replaced.
|
public GHContentBuilder path(String path)
path - the pathpublic GHContentBuilder branch(String branch)
branch - the branchpublic GHContentBuilder sha(String sha)
sha - the shapublic GHContentBuilder content(byte[] content)
content - the contentpublic GHContentBuilder content(String content)
content - the contentpublic GHContentBuilder message(String commitMessage)
commitMessage - the commit messagepublic GHContentUpdateResponse commit() throws IOException
IOException - the io exceptionCopyright © 2020. All rights reserved.