Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedReasons

func AllowedReasons() []string

func CommentFields added in v0.2.0

func CommentFields() []string

func CurrentPullRequestNumber added in v0.3.1

func CurrentPullRequestNumber(repoFlag string) (int, error)

func ExportComments added in v0.2.0

func ExportComments(comments []Comment, fields []string) ([]map[string]interface{}, error)

func IsAllowedReason

func IsAllowedReason(value string) bool

func ParseCommentFields added in v0.2.0

func ParseCommentFields(value string) ([]string, error)

func ParseReason

func ParseReason(value string) (string, error)

func ValidateCommentFields added in v0.2.0

func ValidateCommentFields(fields []string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(log io.Writer) (*Client, error)

func NewWithClient

func NewWithClient(gql GraphQLClient) *Client

func (*Client) FindIssueOrPullRequestComments

func (c *Client) FindIssueOrPullRequestComments(owner, repo string, number int) ([]Comment, error)

func (*Client) MinimizeComment

func (c *Client) MinimizeComment(id, classifier string) error

func (*Client) PullRequestNumberForBranch added in v0.3.1

func (c *Client) PullRequestNumberForBranch(owner, repo, branch string) (int, error)

func (*Client) UnminimizeComment

func (c *Client) UnminimizeComment(id string) error

type Comment

type Comment struct {
	ID              string `json:"id"`
	Author          string `json:"author"`
	AuthorType      string `json:"authorType"`
	Body            string `json:"body"`
	IsMinimized     bool   `json:"isMinimized"`
	MinimizedReason string `json:"minimizedReason"`
}

func (Comment) ExportData added in v0.2.0

func (c Comment) ExportData(fields []string) (map[string]interface{}, error)

type GraphQLClient

type GraphQLClient interface {
	Do(query string, variables map[string]interface{}, response interface{}) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL