types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Client

func (c *Client) Client() *github.Client

func (Client) CreateLabel

func (c Client) CreateLabel(repo *Repo, label Label) *github.Label

func (Client) DeleteLabel

func (c Client) DeleteLabel(repo *Repo, label string)

func (*Client) GenerateClient

func (c *Client) GenerateClient()

func (Client) GetAllOrgRepos

func (c Client) GetAllOrgRepos(org string) (allRepos []*github.Repository)

func (Client) GetAllUserRepos

func (c Client) GetAllUserRepos(user string) (allRepos []*github.Repository)

func (Client) GetLabel

func (c Client) GetLabel(repo *Repo, name string) *github.Label

func (Client) GetLabels

func (c Client) GetLabels(repo *Repo) []*github.Label

func (Client) GetRepoIssues

func (c Client) GetRepoIssues(repo *Repo, label string) ([]*github.Issue, error)

func (Client) GetRepository

func (c Client) GetRepository(owner string, name string) *github.Repository

func (Client) RenameLabel

func (c Client) RenameLabel(repo *Repo, label Rename)

func (Client) UpdateIssueLabels

func (c Client) UpdateIssueLabels(repo *Repo, issue *github.Issue, from string, to string) error

func (Client) UpdateLabel

func (c Client) UpdateLabel(repo *Repo, name string, label Label) *github.Label

type Config

type Config struct {
	Rename []Rename `yaml:"rename"`
	Remove []string `yaml:"remove"`
	Sync   []Label  `yaml:"sync"`
}

func (*Config) FindSyncLabel

func (c *Config) FindSyncLabel(name string) *Label

func (*Config) MergeLeft

func (c *Config) MergeLeft(config Config)

MergeLeft takes the input config and overwrites the values of the original when there is a a duplicate detected.

type Label

type Label struct {
	Name        string `yaml:"name"`
	Color       string `yaml:"color"`
	Description string `yaml:"description"`
}

func (*Label) SetName

func (l *Label) SetName(s string)

type Rename

type Rename struct {
	From string `yaml:"from"`
	To   string `yaml:"to"`
}

type Repo

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

func NewRepo

func NewRepo(fullName string) *Repo

func (*Repo) DeleteLabel

func (r *Repo) DeleteLabel(name string)

func (*Repo) FullName

func (r *Repo) FullName() string

func (*Repo) GetLabel

func (r *Repo) GetLabel(name string) *github.Label

func (*Repo) HasLabel

func (r *Repo) HasLabel(name string) bool

func (*Repo) Labels

func (r *Repo) Labels() map[string]*github.Label

func (*Repo) Name

func (r *Repo) Name() string

func (*Repo) Owner

func (r *Repo) Owner() string

func (*Repo) SetFullName

func (r *Repo) SetFullName(fullName string)

func (*Repo) SetLabel

func (r *Repo) SetLabel(name string, label *github.Label)

func (*Repo) SetLabels

func (r *Repo) SetLabels(labels []*github.Label)

func (*Repo) SetName

func (r *Repo) SetName(name string)

func (*Repo) SetOwner

func (r *Repo) SetOwner(owner string)

Jump to

Keyboard shortcuts

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