java.lang.Object
org.kohsuke.github.GHContentUpdater
Builder for updating existing repository content with support for specifying author and committer information.
Obtain an instance via GHContent.createUpdate().
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionConfigures the author of the commit.Configures the author of the commit.Deprecated.Sets the branch to update the content on.commit()Commits the update.Configures the committer of the commit.Configures the committer of the commit.Deprecated.usecommitter(String, String, Instant)insteadcontent(byte[] newContent) Sets the new file content as raw bytes.Sets the new file content as a string.Sets the commit message.
-
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:
- this updater
-
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:
- this updater
-
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:
- this updater
-
branch
Sets the branch to update the content on.- Parameters:
branch- the branch name- Returns:
- this updater
-
commit
Commits the update.- Returns:
- the response containing the updated content and commit information
- 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:
- this updater
-
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:
- this updater
-
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:
- this updater
-
content
Sets the new file content as a string.- Parameters:
newContent- the new content- Returns:
- this updater
-
content
Sets the new file content as raw bytes.- Parameters:
newContent- the new content bytes- Returns:
- this updater
-
message
Sets the commit message.- Parameters:
message- the commit message- Returns:
- this updater
-
author(String, String, Instant)instead