Package org.kohsuke.github
Class GHCommitBuilder
- java.lang.Object
-
- org.kohsuke.github.GHCommitBuilder
-
public class GHCommitBuilder extends Object
Builder pattern for creating a new commit. Based on https://developer.github.com/v3/git/commits/#create-a-commit
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GHCommitBuilderauthor(String name, String email, Date date)Configures the author of this commit.GHCommitBuildercommitter(String name, String email, Date date)Configures the committer of this commit.GHCommitcreate()Creates a blob based on the parameters specified thus far.GHCommitBuildermessage(String message)Message gh commit builder.GHCommitBuilderparent(String parent)Parent gh commit builder.GHCommitBuildertree(String tree)Tree gh commit builder.
-
-
-
Method Detail
-
message
public GHCommitBuilder message(String message)
Message gh commit builder.- Parameters:
message- the commit message- Returns:
- the gh commit builder
-
tree
public GHCommitBuilder tree(String tree)
Tree gh commit builder.- Parameters:
tree- the SHA of the tree object this commit points to- Returns:
- the gh commit builder
-
parent
public GHCommitBuilder parent(String parent)
Parent gh commit builder.- Parameters:
parent- the SHA of a parent commit.- Returns:
- the gh commit builder
-
author
public GHCommitBuilder author(String name, String email, Date date)
Configures the author of this commit.- Parameters:
name- the nameemail- the emaildate- the date- Returns:
- the gh commit builder
-
committer
public GHCommitBuilder committer(String name, String email, Date date)
Configures the committer of this commit.- Parameters:
name- the nameemail- the emaildate- the date- Returns:
- the gh commit builder
-
create
public GHCommit create() throws IOException
Creates a blob based on the parameters specified thus far.- Returns:
- the gh commit
- Throws:
IOException- the io exception
-
-