github

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package github implements the forge provider using GitHub's REST API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginCommand added in v0.0.6

func LoginCommand(ctx context.Context) (*exec.Cmd, error)

LoginCommand uses gh's interactive flow and credential storage.

func Token

func Token(ctx context.Context, configured string) (token, source string, err error)

Token never includes credentials or command output in an error.

Types

type Provider

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

func New

func New(token string) *Provider

func (*Provider) CheckAuth

func (p *Provider) CheckAuth(ctx context.Context) error

func (*Provider) CreatePR

func (p *Provider) CreatePR(ctx context.Context, repo forge.Repo, in forge.NewPR) (*forge.PR, error)

func (*Provider) GetPR

func (p *Provider) GetPR(ctx context.Context, repo forge.Repo, number int) (*forge.PR, error)

func (*Provider) Merge

func (p *Provider) Merge(ctx context.Context, repo forge.Repo, number int, method string) error

func (*Provider) MergeWithHead

func (p *Provider) MergeWithHead(ctx context.Context, repo forge.Repo, number int, method, head string) (*forge.PR, error)

func (*Provider) PRForBranch

func (p *Provider) PRForBranch(ctx context.Context, repo forge.Repo, branch string) (*forge.PR, error)

func (*Provider) ResetAuth added in v0.0.6

func (p *Provider) ResetAuth()

ResetAuth reloads credentials after an interactive login.

func (*Provider) WebURL

func (*Provider) WebURL(pr *forge.PR) string

Jump to

Keyboard shortcuts

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