Class GHContentBuilder


  • public final class GHContentBuilder
    extends Object
    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:
    GHRepository#createContent()
    • Method Detail

      • path

        public GHContentBuilder path​(String path)
        Path gh content builder.
        Parameters:
        path - the path
        Returns:
        the gh content builder
      • branch

        public GHContentBuilder branch​(String branch)
        Branch gh content builder.
        Parameters:
        branch - the branch
        Returns:
        the gh content builder
      • sha

        public GHContentBuilder sha​(String 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
      • content

        public GHContentBuilder content​(byte[] content)
        Content gh content builder.
        Parameters:
        content - the content
        Returns:
        the gh content builder
      • content

        public GHContentBuilder content​(String content)
        Content gh content builder.
        Parameters:
        content - the content
        Returns:
        the gh content builder
      • message

        public GHContentBuilder message​(String commitMessage)
        Message gh content builder.
        Parameters:
        commitMessage - the commit message
        Returns:
        the gh content builder