gh

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

NewClient return Client

func (*Client) AddComment

func (c *Client) AddComment(ctx context.Context, n int, comment string) error

func (*Client) CloseIssue

func (c *Client) CloseIssue(ctx context.Context, n int) error

func (*Client) FetchTarget

func (c *Client) FetchTarget(ctx context.Context, n int) (*target.Target, error)

func (*Client) FetchTargets

func (c *Client) FetchTargets(ctx context.Context) (target.Targets, error)

func (*Client) MergePullRequest

func (c *Client) MergePullRequest(ctx context.Context, n int) error

func (*Client) ResolveUsers added in v0.1.1

func (c *Client) ResolveUsers(ctx context.Context, in []string) ([]string, error)

func (*Client) SetAssignees

func (c *Client) SetAssignees(ctx context.Context, n int, assignees []string) error

func (*Client) SetLabels

func (c *Client) SetLabels(ctx context.Context, n int, labels []string) error

func (*Client) SetReviewers

func (c *Client) SetReviewers(ctx context.Context, n int, reviewers []string) error

type GhClient added in v0.5.0

type GhClient interface {
	FetchTargets(ctx context.Context) (target.Targets, error)
	FetchTarget(ctx context.Context, n int) (*target.Target, error)
	SetLabels(ctx context.Context, n int, labels []string) error
	SetAssignees(ctx context.Context, n int, assignees []string) error
	SetReviewers(ctx context.Context, n int, reviewers []string) error
	AddComment(ctx context.Context, n int, comment string) error
	CloseIssue(ctx context.Context, n int) error
	MergePullRequest(ctx context.Context, n int) error
	ResolveUsers(ctx context.Context, in []string) ([]string, error)
}

type GitHubEvent added in v0.16.0

type GitHubEvent struct {
	Name    string
	Number  int
	State   string
	Payload interface{}
}

func DecodeGitHubEvent added in v0.16.0

func DecodeGitHubEvent() (*GitHubEvent, error)

Jump to

Keyboard shortcuts

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