github

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: GPL-3.0 Imports: 19 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 interface {
	CreatePullRequest(ctx context.Context, pr NewPullRequest) (PullRequest, error)
	TestConnection(ctx context.Context) error
	GitCredentialsForRepo(ctx context.Context, repo RepoRef) (git.Credentials, error)
}

func New

func New(ghCfg *config.GitHub) (Client, error)

func NewAppClient

func NewAppClient(ghCfg *config.GitHub) (Client, error)

func NewPATClient

func NewPATClient(ghCfg *config.GitHub) (Client, error)

type NewPullRequest

type NewPullRequest struct {
	RepoRef
	Title       string
	Description string
	Head        string
	Base        string
	Commit      git.Commit
}

type PullRequest

type PullRequest struct {
	RepoRef
	ID          int64
	Number      int
	URL         string
	Title       string
	Description string
	Head        string
	Base        string
	Commit      git.Commit
}

func CreatePullRequest

func CreatePullRequest(ctx context.Context, gh *github.Client, pr NewPullRequest) (PullRequest, error)

type RepoRef

type RepoRef struct {
	URL   string
	Owner string
	Repo  string
}

func ParseRepoRef

func ParseRepoRef(remote string) (RepoRef, error)

func (RepoRef) Slim

func (r RepoRef) Slim() RepoRefSlim

func (RepoRef) String

func (r RepoRef) String() string

type RepoRefSlim

type RepoRefSlim struct {
	Owner string
	Repo  string
}

func (RepoRefSlim) String

func (r RepoRefSlim) String() string

Jump to

Keyboard shortcuts

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