Class GHContentDeleter

java.lang.Object
org.kohsuke.github.GHContentDeleter

public final class GHContentDeleter extends Object
Builder for deleting repository content with support for specifying author and committer information.

Obtain an instance via GHContent.createDelete().

See Also:
  • Method Details

    • author

      public GHContentDeleter author(String name, String email)
      Configures the author of the commit. If not specified, the authenticated user is used as the author.
      Parameters:
      name - the name of the author
      email - the email of the author
      Returns:
      this deleter
    • author

      @Deprecated public GHContentDeleter author(String name, String email, Date date)
      Deprecated.
      Configures the author of the commit. If not specified, the authenticated user is used as the author.
      Parameters:
      name - the name of the author
      email - the email of the author
      date - the date of the authoring
      Returns:
      this deleter
    • author

      public GHContentDeleter author(String name, String email, Instant date)
      Configures the author of the commit. If not specified, the authenticated user is used as the author.
      Parameters:
      name - the name of the author
      email - the email of the author
      date - the timestamp for the authoring
      Returns:
      this deleter
    • branch

      public GHContentDeleter branch(String branch)
      Sets the branch to delete the content from.
      Parameters:
      branch - the branch name
      Returns:
      this deleter
    • commit

      public GHContentUpdateResponse commit() throws IOException
      Commits the deletion.
      Returns:
      the response containing the commit information
      Throws:
      IOException - the io exception
    • committer

      public GHContentDeleter committer(String name, String email)
      Configures the committer of the commit. If not specified, the authenticated user is used as the committer.
      Parameters:
      name - the name of the committer
      email - the email of the committer
      Returns:
      this deleter
    • committer

      @Deprecated public GHContentDeleter committer(String name, String email, Date date)
      Deprecated.
      Configures the committer of the commit. If not specified, the authenticated user is used as the committer.
      Parameters:
      name - the name of the committer
      email - the email of the committer
      date - the date of the commit
      Returns:
      this deleter
    • committer

      public GHContentDeleter committer(String name, String email, Instant date)
      Configures the committer of the commit. If not specified, the authenticated user is used as the committer.
      Parameters:
      name - the name of the committer
      email - the email of the committer
      date - the timestamp of the commit
      Returns:
      this deleter
    • message

      public GHContentDeleter message(String message)
      Sets the commit message.
      Parameters:
      message - the commit message
      Returns:
      this deleter