java.lang.Object
org.kohsuke.github.GHContentBuilder
Used to create/update content.
Call various methods to build up parameters, then call commit() to make the change effective.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionConfigures the author of the commit.Configures the author of the commit.Deprecated.Branch gh content builder.commit()Commits a new content.Configures the committer of the commit.Configures the committer of the commit.Deprecated.usecommitter(String, String, Instant)insteadcontent(byte[] content) Content gh content builder.Content gh content builder.Message gh content builder.Path gh content builder.Used when updating (but not creating a new content) to specify the blob SHA of the file being replaced.
-
Method Details
-
author
Configures the author of the commit. If not specified, the authenticated user is used as the author.- Parameters:
name- the name of the authoremail- the email of the author- Returns:
- the gh content builder
-
author
Deprecated.useauthor(String, String, Instant)insteadConfigures the author of the commit. If not specified, the authenticated user is used as the author.- Parameters:
name- the name of the authoremail- the email of the authordate- the date of the authoring- Returns:
- the gh content builder
-
author
Configures the author of the commit. If not specified, the authenticated user is used as the author.- Parameters:
name- the name of the authoremail- the email of the authordate- the timestamp for the authoring- Returns:
- the gh content builder
-
branch
Branch gh content builder.- Parameters:
branch- the branch- Returns:
- the gh content builder
-
commit
Commits a new content.- Returns:
- the gh content update response
- Throws:
IOException- the io exception
-
committer
Configures the committer of the commit. If not specified, the authenticated user is used as the committer.- Parameters:
name- the name of the committeremail- the email of the committer- Returns:
- the gh content builder
-
committer
Deprecated.usecommitter(String, String, Instant)insteadConfigures the committer of the commit. If not specified, the authenticated user is used as the committer.- Parameters:
name- the name of the committeremail- the email of the committerdate- the date of the commit- Returns:
- the gh content builder
-
committer
Configures the committer of the commit. If not specified, the authenticated user is used as the committer.- Parameters:
name- the name of the committeremail- the email of the committerdate- the timestamp of the commit- Returns:
- the gh content builder
-
content
Content gh content builder.- Parameters:
content- the content- Returns:
- the gh content builder
-
content
Content gh content builder.- Parameters:
content- the content- Returns:
- the gh content builder
-
message
Message gh content builder.- Parameters:
commitMessage- the commit message- Returns:
- the gh content builder
-
path
Path gh content builder.- Parameters:
path- the path- Returns:
- the gh content builder
-
sha
Used when updating (but not creating a new content) to specify the blob SHA of the file being replaced.- Parameters:
sha- the sha- Returns:
- the gh content builder
-
author(String, String, Instant)instead