public class GHTreeBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
GHTreeBuilder |
add(String path,
byte[] content,
boolean executable)
Adds a new entry with the given binary content to the tree.
|
GHTreeBuilder |
add(String path,
String content,
boolean executable)
Adds a new entry with the given text content to the tree.
|
GHTreeBuilder |
baseTree(String baseTree)
Base tree gh tree builder.
|
GHTree |
create()
Creates a tree based on the parameters specified thus far.
|
GHTreeBuilder |
entry(String path,
String mode,
String type,
String sha,
String content)
Deprecated.
use
add(String, String, boolean) or add(String, byte[], boolean) instead. |
GHTreeBuilder |
shaEntry(String path,
String sha,
boolean executable)
Deprecated.
use
add(String, String, boolean) or add(String, byte[], boolean) instead. |
GHTreeBuilder |
textEntry(String path,
String content,
boolean executable)
Deprecated.
use
add(String, String, boolean) or add(String, byte[], boolean) instead. |
public GHTreeBuilder baseTree(String baseTree)
baseTree - the SHA of tree you want to update with new data@Deprecated public GHTreeBuilder entry(String path, String mode, String type, String sha, String content)
add(String, String, boolean) or add(String, byte[], boolean) instead.sha and content must be non-null.path - the pathmode - the modetype - the typesha - the shacontent - the content@Deprecated public GHTreeBuilder shaEntry(String path, String sha, boolean executable)
add(String, String, boolean) or add(String, byte[], boolean) instead.entry(String, String, String, String, String) for adding an existing blob
referred by its SHA.path - the pathsha - the shaexecutable - the executable@Deprecated public GHTreeBuilder textEntry(String path, String content, boolean executable)
add(String, String, boolean) or add(String, byte[], boolean) instead.entry(String, String, String, String, String) for adding a text file with the
specified content.path - the pathcontent - the contentexecutable - the executablepublic GHTreeBuilder add(String path, byte[] content, boolean executable)
path - the file path in the treecontent - the file content as byte arrayexecutable - true, if the file should be executablepublic GHTreeBuilder add(String path, String content, boolean executable)
path - the file path in the treecontent - the file content as UTF-8 encoded stringexecutable - true, if the file should be executablepublic GHTree create() throws IOException
IOException - the io exceptionCopyright © 2020. All rights reserved.