repository

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Owner string
	Name  string
	Token string
}

Config is Repository configuration.

type Repository

type Repository struct {
	*github.Client
	// contains filtered or unexported fields
}

Repository represents GitHub repository.

func New

func New(conf Config) *Repository

New creates new Repository.

func (Repository) AddLabelsToPullRequest

func (r Repository) AddLabelsToPullRequest(number int, labels []string) error

AddLabelsToPullRequest adds labels to a pull request.

func (Repository) FileContent

func (r Repository) FileContent(filepath string) (*github.RepositoryContent, error)

FileContent returns content of a single file. If filepath doesn't reference to a file it returns nil.

func (Repository) Name

func (r Repository) Name() string

Name is repository name.

func (Repository) OpenPullRequests

func (r Repository) OpenPullRequests() ([]*github.PullRequest, error)

OpenPullRequests lists all the pull requests in the open state.

func (Repository) Owner

func (r Repository) Owner() string

Owner is repository owner.

func (Repository) PullRequestModifiedFiles

func (r Repository) PullRequestModifiedFiles(number int) ([]*github.CommitFile, error)

PullRequestModifiedFiles lists the files in a pull request.

Jump to

Keyboard shortcuts

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