legacy

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 3 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(ctx context.Context, accessToken string) *Client

func (*Client) CreateBranch

func (c *Client) CreateBranch(ctx context.Context, req CreateBranchRequest) (*github.Reference, *github.Response, error)

func (*Client) CreatePullRequest

func (c *Client) CreatePullRequest(ctx context.Context, req CreatePRRequest) (*github.PullRequest, *github.Response, error)

func (*Client) GetBranch

func (*Client) GetRepositoryContents

func (c *Client) GetRepositoryContents(ctx context.Context, req GetRepositoryContentsRequest) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)

func (*Client) GetRepositoryReleases

func (c *Client) GetRepositoryReleases(ctx context.Context, req CommonRequest) ([]*github.RepositoryRelease, *github.Response, error)

type CommonRequest

type CommonRequest struct {
	Owner string
	Repo  string
}

type CreateBranchRequest

type CreateBranchRequest struct {
	Owner string
	Repo  string
	*github.Reference
}

type CreatePRRequest

type CreatePRRequest struct {
	Owner string
	Repo  string
	*github.NewPullRequest
}

type GetBranchRequest

type GetBranchRequest struct {
	Owner      string
	Repo       string
	BranchName string
}

type GetReleaseRequest

type GetReleaseRequest struct {
	Owner     string
	Repo      string
	ReleaseID int64
}

type GetRepositoryContentsRequest

type GetRepositoryContentsRequest struct {
	Owner  string
	Repo   string
	Path   string
	Branch string
}

type Interface

type Interface interface {
	// GetRepositoryContents
	//
	// Fetches a specific file/folder in a github repo on a given branch.
	GetRepositoryContents(ctx context.Context, req GetRepositoryContentsRequest) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)

	// GetRepositoryReleases
	//
	// Get all releases from a given repository.
	GetRepositoryReleases(ctx context.Context, req CommonRequest) ([]*github.RepositoryRelease, *github.Response, error)

	// GetBranch
	//
	// Returns a branch given a branch name.
	GetBranch(ctx context.Context, req GetBranchRequest) (*github.Reference, *github.Response, error)

	// CreatePullRequest
	//
	// Creates a Pull Requests on a given repository.
	CreatePullRequest(ctx context.Context, req CreatePRRequest) (*github.PullRequest, *github.Response, error)

	// CreateBranch
	//
	// Creates a branch on a given repository.
	CreateBranch(ctx context.Context, req CreateBranchRequest) (*github.Reference, *github.Response, error)

	// UpdateFile
	//
	// Updates a file in a given repo with new content.
	UpdateFile(ctx context.Context, req UpdateFileRequest) (*github.RepositoryContentResponse, *github.Response, error)
}

type UpdateFileRequest

type UpdateFileRequest struct {
	Owner    string
	Repo     string
	FilePath string
	*github.RepositoryContentFileOptions
}

Jump to

Keyboard shortcuts

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