github

package
v0.0.0-...-481e254 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 10 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 files a publication into a GitHub repository: the RFC as an issue, each child as a sub-issue of it, and each depends_on edge as a "blocked by" relation, the way hive's hive-open-issue does.

Index

Constants

View Source
const DefaultAPI = "https://api.github.com"

DefaultAPI is GitHub's REST endpoint; tests point the client elsewhere.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

type Target struct {
	Owner string
	Repo  string
	// API is the REST base URL, DefaultAPI unless set.
	API   string
	Token string
	// HTTPClient defaults to one with requestTimeout.
	HTTPClient *http.Client
	// UserAgent identifies the client; GitHub requires one.
	UserAgent string
}

Target is the GitHub implementation of publish.Target for one repo.

func New

func New(owner, repo, token string) *Target

New returns a target for owner/repo authenticated with token.

func (*Target) Find

func (t *Target) Find(ctx context.Context, artifactID string) (*publish.Existing, error)

Find implements publish.Target by searching issue bodies for the marker.

func (*Target) Name

func (t *Target) Name() string

Name implements publish.Target.

func (*Target) Publish

Publish implements publish.Target. Creation order: the RFC first (its URL goes into every child's marker), then the children, then the relations, then the RFC body again with the children's numbers in its checklist. Relations are best effort: a failure becomes a warning, never an error, because the issues exist and a re-run with --update repairs them.

func (*Target) Slug

func (t *Target) Slug() string

Slug is owner/repo.

Directories

Path Synopsis
Package githubtest is a fake GitHub REST API for tests of the publish github target and of the publish command.
Package githubtest is a fake GitHub REST API for tests of the publish github target and of the publish command.

Jump to

Keyboard shortcuts

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