github

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 6 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
}

Client wraps the GitHub API client.

func NewClient

func NewClient(ctx context.Context, token string) *Client

NewClient creates a new GitHub client using the provided token. If token is empty, it returns an unauthenticated client.

func (*Client) AddLabels

func (c *Client) AddLabels(ctx context.Context, org, repo string, number int, labels []string) error

AddLabels adds labels to an issue.

func (*Client) CreateComment

func (c *Client) CreateComment(ctx context.Context, org, repo string, number int, body string) error

CreateComment posts a comment on an issue.

func (*Client) GetIssue

func (c *Client) GetIssue(ctx context.Context, org, repo string, number int) (*github.Issue, error)

GetIssue fetches issue details.

func (*Client) TransferIssue

func (c *Client) TransferIssue(ctx context.Context, org, repo string, number int, targetRepo string) error

TransferIssue transfers an issue to another repository. Note: Transferring issues via API requires the user to have admin access. targetRepo should be in "owner/repo" format.

TODO: GitHub's REST API for issue transfers is complex and may require GraphQL. This is not yet implemented. See https://docs.github.com/en/graphql/reference/mutations#transferissue

Jump to

Keyboard shortcuts

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