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

github

package
v0.161.0 Latest Latest
Warning

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

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

Documentation

Overview

Package github provides typed GitHub REST and GraphQL access via the go-gh library. Credentials resolve through go-gh's auth chain (GH_TOKEN/GITHUB_TOKEN, hosts.yml, then the gh binary's keyring); no gh CLI stdout is ever parsed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForHost

func ForHost(host string) (*client, error)

ForHost returns a client for the given GitHub host ("" means github.com). Credentialed clients are cached per host; when envGitHubAPIBase is set every call builds a fresh client routed at it, so a per-test fixture URL takes effect immediately.

Types

type CreatePRParams

type CreatePRParams struct {
	Owner, Repo, Head, Base, Title, Body string
	Draft                                bool
}

CreatePRParams describes a pull request to open.

type PRComment

type PRComment struct {
	ID   int    `json:"id"`
	Path string `json:"path"`
	Line int    `json:"line"`
	Body string `json:"body"`
	User struct {
		Login string `json:"login"`
		Type  string `json:"type"`
	} `json:"user"`
	CreatedAt string `json:"created_at"`
	DiffHunk  string `json:"diff_hunk"`
	InReplyTo int    `json:"in_reply_to_id"`
}

PRComment is one inline review comment or issue comment as returned by the GitHub REST API (subset of fields the orchestrator consumes).

Jump to

Keyboard shortcuts

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