github

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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