github

package
v0.0.0-...-27dad89 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(host string) (string, error)

Types

type Builder

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

func New

func New() *Builder

func (*Builder) Build

func (ghb *Builder) Build() (*Client, error)

func (*Builder) Host

func (ghb *Builder) Host(host string) *Builder

func (*Builder) Token

func (ghb *Builder) Token(token string) *Builder

type Client

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

func (*Client) CreateReleases

func (gh *Client) CreateReleases(ctx context.Context, owner string, releases []*RepositoryRelease, createReleaseBranch bool) []*RepositoryReleaseResponse

func (*Client) Orgs

func (gh *Client) Orgs(ctx context.Context) (<-chan *OrgResponse, func() error)

Orgs async retrival of GitHub organizations. Returns a channel to listen to for OrgsResponse and the function to run as a goroutine to acquire them.

func (*Client) ReleasableReposByOrg

func (gh *Client) ReleasableReposByOrg(ctx context.Context, org, branch string) (<-chan *ReleaseableRepoResponse, func() error)

ReleaseableReposByOrg async retrival of GitHub repositories for an organization. Returns a channel to listen to for ReleasableRepos and the function to run as a goroutine to acquire them.

Filters out: archived, templates, repositories with 0 new commits since last Tag

func (*Client) ReleaseableRepo

func (gh *Client) ReleaseableRepo(ctx context.Context, org string, repo *github.Repository, branch string) (*ReleaseableRepoResponse, error)

func (*Client) ReleaseableReposByUser

func (gh *Client) ReleaseableReposByUser(ctx context.Context, user, branch string) (<-chan *ReleaseableRepoResponse, func() error)

func (*Client) User

func (gh *Client) User(ctx context.Context) (*github.User, error)

User get the current authenticated user.

type OrgResponse

type OrgResponse struct {
	// Total determines when all user Organizations are finished being loaded.
	Total int
	// Org GitHub organization or the current user.
	Org *Organization
}

type Organization

type Organization struct {
	Login       string
	Description string
	URL         string
}

type ReleaseableRepoResponse

type ReleaseableRepoResponse struct {
	// Total determines when all user Organizations are finished being loaded.
	Total int32
	// Repos in a GitHub organization that have been updated more recently than their newest tag/release.
	Commits   []*github.RepositoryCommit
	Repo      *github.Repository
	LatestTag *github.RepositoryTag
	Branches  []*github.Branch
	Branch    string
}

type RepositoryRelease

type RepositoryRelease struct {
	Name      string
	Version   string
	Body      string
	TargetSHA string
}

type RepositoryReleaseResponse

type RepositoryReleaseResponse struct {
	Owner   string
	Name    string
	Version string
	Body    string
	URL     string
	Error   error
}

func (*RepositoryReleaseResponse) IsError

func (rrr *RepositoryReleaseResponse) IsError() bool

Jump to

Keyboard shortcuts

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