Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package github is GitHub as scm/1 and tracker/1: pull requests, Actions runs and job logs, releases and issues of the repository the origin remote (or plugins.github.project) names, over the REST API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(c *sdk.Ctx) (forge.SCM, error)

Open reads plugins.github (url, project, token) with GITHUB_TOKEN or GH_TOKEN as the token's fallback; a url other than github.com is GitHub Enterprise (its /api/v3).

Types

type GitHub

type GitHub struct{ *forge.Client }

func (GitHub) Approve

func (g GitHub) Approve(ctx context.Context, mr string) error

func (GitHub) Comment

func (g GitHub) Comment(ctx context.Context, mr, body string) error

func (GitHub) Files

func (g GitHub) Files(ctx context.Context, mr string) ([]forge.File, error)

func (GitHub) Issue

func (g GitHub) Issue(ctx context.Context, key string) (*forge.IssueDetail, error)

func (GitHub) IssueComment

func (g GitHub) IssueComment(ctx context.Context, key, body string) error

func (GitHub) Issues

func (g GitHub) Issues(ctx context.Context, query, assignee string) ([]forge.Issue, error)

func (GitHub) Jobs

func (g GitHub) Jobs(ctx context.Context, pipeline string) ([]forge.Job, error)

func (GitHub) Log

func (g GitHub) Log(ctx context.Context, id string) ([]string, bool, error)

Log reads a job's log; GitHub serves it only once the job has finished.

func (GitHub) MR

func (g GitHub) MR(ctx context.Context, mr string) (string, error)

func (GitHub) MRs

func (g GitHub) MRs(ctx context.Context, state, author, query string) ([]forge.MR, error)

func (GitHub) Merge

func (g GitHub) Merge(ctx context.Context, mr string) error

func (GitHub) Open

func (g GitHub) Open(ctx context.Context, source, target, title, body string) (*forge.MR, error)

func (GitHub) Pipelines

func (g GitHub) Pipelines(ctx context.Context, ref string, limit int) ([]forge.Pipeline, error)

func (GitHub) Rebase

func (g GitHub) Rebase(context.Context, string) error

func (GitHub) Releases

func (g GitHub) Releases(ctx context.Context, query string) ([]forge.Release, error)

func (GitHub) Retry

func (g GitHub) Retry(ctx context.Context, id string) error

func (GitHub) Transition

func (g GitHub) Transition(ctx context.Context, key, status string) error

Jump to

Keyboard shortcuts

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