github

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package github provides utilities for interacting with the GitHub API.

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, error)

NewClient creates a new GitHub client with the provided token.

func (*Client) CreateReleasePR

func (c *Client) CreateReleasePR(ctx context.Context, req PRRequest) (*PRResult, error)

CreateReleasePR creates a new branch with the modified files and opens a PR.

func (*Client) GetFileContent

func (c *Client) GetFileContent(ctx context.Context, owner, repo, path, ref string) (string, error)

GetFileContent retrieves the content of a file from a repository.

type PRRequest

type PRRequest struct {
	Owner      string
	Repo       string
	BaseBranch string
	HeadBranch string
	Title      string
	Body       string
	Files      []string
}

PRRequest contains the parameters for creating a pull request.

type PRResult

type PRResult struct {
	Number int
	URL    string
}

PRResult contains the result of creating a pull request.

Jump to

Keyboard shortcuts

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