java.lang.Object
org.kohsuke.github.GHCommitBuilder
Builder pattern for creating a new commit. Based on https://developer.github.com/v3/git/commits/#create-a-commit
-
Method Summary
Modifier and TypeMethodDescriptionConfigures the author of this commit.Configures the committer of this commit.create()
Creates a blob based on the parameters specified thus far.Message gh commit builder.Parent gh commit builder.Tree gh commit builder.withSignature
(String signature) Configures the PGP signature of this commit.
-
Method Details
-
message
Message gh commit builder.- Parameters:
message
- the commit message- Returns:
- the gh commit builder
-
tree
Tree gh commit builder.- Parameters:
tree
- the SHA of the tree object this commit points to- Returns:
- the gh commit builder
-
parent
Parent gh commit builder.- Parameters:
parent
- the SHA of a parent commit.- Returns:
- the gh commit builder
-
author
Configures the author of this commit.- Parameters:
name
- the nameemail
- the emaildate
- the date- Returns:
- the gh commit builder
-
withSignature
Configures the PGP signature of this commit.- Parameters:
signature
- the signature calculated from the commit- Returns:
- the gh commit builder
-
committer
Configures the committer of this commit.- Parameters:
name
- the nameemail
- the emaildate
- the date- Returns:
- the gh commit builder
-
create
Creates a blob based on the parameters specified thus far.- Returns:
- the gh commit
- Throws:
IOException
- the io exception
-