fetcher

package
v0.0.0-...-25a8327 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCommitGap = 20

DefaultCommitGap refers default gap commit number. If the PR is hehind the master branch more DefaultCommitGap commits, robot would tell submitter to rebase.

View Source
const FetchInterval = 3 * time.Minute

FetchInterval refers the interval of fetch action

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

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

Fetcher is a worker to periodically get elements from github.

func New

func New(client *gh.Client, CommitsGap int) *Fetcher

New initializes a brand new fetch.

func (*Fetcher) AddConflictCommentToPR

func (f *Fetcher) AddConflictCommentToPR(pr *github.PullRequest) error

AddConflictCommentToPR adds conflict comments to specific pull request.

func (*Fetcher) AddGapCommentToPR

func (f *Fetcher) AddGapCommentToPR(pr *github.PullRequest, gap int) error

AddGapCommentToPR adds gap comments to specific pull request.

func (*Fetcher) CheckPRsConflict

func (f *Fetcher) CheckPRsConflict() error

CheckPRsConflict checks that if a PR is conflict with the against branch.

func (*Fetcher) CheckPRsGap

func (f *Fetcher) CheckPRsGap() error

CheckPRsGap checks that if a PR is more than fetcher.gapCommits commits behind the branch.

func (*Fetcher) Run

func (f *Fetcher) Run()

Run starts periodical work

Jump to

Keyboard shortcuts

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