Klasse GHIssueBuilder

java.lang.Object
de.coho04.githubapi.bases.GHBase
de.coho04.githubapi.builders.GHIssueBuilder
Alle implementierten Schnittstellen:
HttpRequestInterface, JSONHelper

public class GHIssueBuilder extends GHBase
The GHIssueBuilder class is used to build and create GitHub issues. This class provides methods to set various properties of an issue such as title, body, assignee, milestone, and labels. It extends the GHBase class and implements the JSONHelper and HttpRequestInterface interfaces. This class is part of the builder pattern to simplify issue creation on GitHub.
  • Konstruktordetails

    • GHIssueBuilder

      public GHIssueBuilder(Github github, String url, String title)
      Constructs a new GHIssueBuilder instance with the specified GitHub instance and title.
      Parameter:
      github - the GitHub instance
      title - the title of the issue
    • GHIssueBuilder

      public GHIssueBuilder(Github github, String url, String title, String body)
      Constructs a new GHIssueBuilder instance with the specified GitHub instance, title, and body.
      Parameter:
      github - the GitHub instance
      title - the title of the issue
      body - the body of the issue
  • Methodendetails

    • setTitle

      public void setTitle(String title)
      Sets the title of the issue.
      Parameter:
      title - the title to set
    • assignee

      public GHIssueBuilder assignee(String user)
      Sets the assignee of the issue.
      Parameter:
      user - the username of the assignee
      Gibt zurück:
      the current instance of GHIssueBuilder
    • addLabel

      public GHIssueBuilder addLabel(String label)
      Adds a label to the issue.
      Parameter:
      label - the label to be added to the issue
      Gibt zurück:
      the current instance of GHIssueBuilder
    • create

      public GHIssue create()
      Creates a new GHIssue instance based on the current state of the builder.
      Gibt zurück:
      a new GHIssue instance
    • getTitle

      public String getTitle()
      Returns the title of the issue.
      Gibt zurück:
      the title of the issue
    • getBody

      public String getBody()
    • setBody

      public void setBody(String body)
    • setMilestone

      public void setMilestone(GHMilestone milestone)
    • getGithub

      public Github getGithub()
    • getUrl

      public String getUrl()
    • getLabels

      public List<String> getLabels()
    • getMilestone

      public GHMilestone getMilestone()
    • getState

      public GHState getState()
    • getAssignees

      public List<String> getAssignees()
    • toJSONObject

      public org.json.JSONObject toJSONObject()
      Converts the current state of the builder to a JSONObject.
      Setzt außer Kraft:
      toJSONObject in Klasse GHBase
      Gibt zurück:
      a JSONObject representing the current state of the builder