github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListRepositories(ctx context.Context, owner string) ([]*github.Repository, error)
	UpdateRepository(ctx context.Context, owner, repo string, opts *UpdateRepositoryOptions) error
}

func NewClient

func NewClient(token string, httpClient *http.Client, opts ...Option) (Client, error)

type Option

type Option func(*client)

func WithDryRun

func WithDryRun(v bool) Option

func WithLogger

func WithLogger(l *zap.Logger) Option

type UpdateRepositoryOptions

type UpdateRepositoryOptions struct {
	// Name                string
	// Description         string
	// Homepage            string
	// Private             bool
	// Visibility          bool
	HasIssues   bool `json:"has_issues"`
	HasProjects bool `json:"has_projects"`
	HasWiki     bool `json:"has_wiki"`
	// IsTemplate         bool
	DefaultBranch       string `json:"default_branch"`
	AllowSquashMerge    bool   `json:"allow_squash_merge"`
	AllowMergeCommit    bool   `json:"allow_merge_commit"`
	AllowRebaseMerge    bool   `json:"allow_rebase_merge"`
	DeleteBranchOnMerge bool   `json:"delete_branch_on_merge"`
}

UpdateRepositoryRequest is a request for updating a repository. https://developer.github.com/v3/repos/#update-a-repository The fields intentionally commented out are dangerous for bulk update.

Jump to

Keyboard shortcuts

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