Class GHIssue


  • public class GHIssue
    extends Object
    GitHub issue.
    • Method Detail

      • addLabel

        public void addLabel​(GHLabel label)
                      throws FB2GHException
        Add label to this issue.
        Parameters:
        label - The label to add
        Throws:
        FB2GHException - if a GitHub error occurs
      • addLabels

        public void addLabels​(List<GHLabel> labels)
                       throws FB2GHException
        Add labels to this issue.
        Parameters:
        labels - The labels to add
        Throws:
        FB2GHException - if a GitHub error occurs
      • addComment

        public GHComment addComment​(String comment)
                             throws FB2GHException
        Add a comment.
        Parameters:
        comment - The contents of the comment. Supports Markdown.
        Returns:
        The added comment.
        Throws:
        FB2GHException - if a GitHub error occurs
      • isOpen

        public boolean isOpen()
                       throws FB2GHException
        Returns:
        true if the issue is open. false if it is closed
        Throws:
        FB2GHException - if a GitHub error occurs
      • isClosed

        public boolean isClosed()
                         throws FB2GHException
        Returns:
        true if the issue is closed. false if it is open
        Throws:
        FB2GHException - if a GitHub error occurs
      • assignTo

        public void assignTo​(String ghUsername)
                      throws FB2GHException
        Assign this issue to another user.
        Parameters:
        ghUsername - GitHub username
        Throws:
        FB2GHException - if a GitHub error occurs
      • setMilestone

        public void setMilestone​(GHMilestone milestone)
                          throws FB2GHException
        Add this issue to a milestone. NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise.
        Parameters:
        milestone - The GHMilestone to associate this issue with or null to remove current.
        Throws:
        FB2GHException - if a GitHub error occurs
      • getId

        public int getId()
                  throws FB2GHException
        Get the ID of this issue.
        Returns:
        ID of issue
        Throws:
        FB2GHException - if a GitHub error occurs