pulls

package
v0.0.0-...-ec84bd6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package pulls deals with munging of github pull requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllMungers

func GetAllMungers() []config.PRMunger

GetAllMungers returns a slice of all registered mungers. This list is completely independant of the mungers selected at runtime in --pr-mungers. This is all possible mungers.

func MungePullRequests

func MungePullRequests(config *config.MungeConfig) error

MungePullRequests is the main function which asks that each munger be called for each PR

func RegisterMunger

func RegisterMunger(munger config.PRMunger) error

RegisterMunger should be called in `init()` by each munger to make itself available by name

func RegisterMungerOrDie

func RegisterMungerOrDie(munger config.PRMunger)

RegisterMungerOrDie will call RegisterMunger but will be fatal on error

Types

type BlunderbussConfig

type BlunderbussConfig struct {
	PrefixMap map[string][]string `json:"prefixMap,omitempty" yaml:"prefixMap,omitempty"`
}

A BlunderbussConfig maps a set of file prefixes to a set of owner names (github users)

type BlunderbussMunger

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

BlunderbussMunger will assign issues to users based on the config file provided by --blunderbuss-config.

func (*BlunderbussMunger) AddFlags

func (b *BlunderbussMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (*BlunderbussMunger) MungePullRequest

func (b *BlunderbussMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (*BlunderbussMunger) Name

func (b *BlunderbussMunger) Name() string

Name is the name usable in --pr-mungers

type LGTMAfterCommitMunger

type LGTMAfterCommitMunger struct{}

LGTMAfterCommitMunger will remove the LGTM flag from an PR which has been updated since the reviewer added LGTM

func (LGTMAfterCommitMunger) AddFlags

func (LGTMAfterCommitMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (LGTMAfterCommitMunger) MungePullRequest

func (LGTMAfterCommitMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (LGTMAfterCommitMunger) Name

Name is the name usable in --pr-mungers

type NeedsRebaseMunger

type NeedsRebaseMunger struct{}

NeedsRebaseMunger will add the "needs-rebase" label to any issue which is unable to be automatically merged

func (NeedsRebaseMunger) AddFlags

func (NeedsRebaseMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (NeedsRebaseMunger) MungePullRequest

func (NeedsRebaseMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (NeedsRebaseMunger) Name

func (NeedsRebaseMunger) Name() string

Name is the name usable in --pr-mungers

type OkToTestMunger

type OkToTestMunger struct{}

OkToTestMunger looks for situations where a reviewer has LGTM'd a PR, but it isn't ok to test by the k8s-bot, and adds an 'ok to test' comment to the PR.

func (OkToTestMunger) AddFlags

func (OkToTestMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (OkToTestMunger) MungePullRequest

func (OkToTestMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (OkToTestMunger) Name

func (OkToTestMunger) Name() string

Name is the name usable in --pr-mungers

type PathLabelMunger

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

PathLabelMunger will add labels to PRs based on what files it modified. The mapping of files to labels if provided in a file in --path-label-config

func (*PathLabelMunger) AddFlags

func (p *PathLabelMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (*PathLabelMunger) MungePullRequest

func (p *PathLabelMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (*PathLabelMunger) Name

func (p *PathLabelMunger) Name() string

Name is the name usable in --pr-mungers

type PingCIMunger

type PingCIMunger struct{}

PingCIMunger looks for situations CI (Travis | Shippable) has flaked for some reason and we want to re-run them. Achieves this by closing and re-opening the pr

func (PingCIMunger) AddFlags

func (PingCIMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (PingCIMunger) MungePullRequest

func (PingCIMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (PingCIMunger) Name

func (PingCIMunger) Name() string

Name is the name usable in --pr-mungers

type SizeMunger

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

SizeMunger will update a label on a PR based on how many lines are changed. It will exclude certain files in it's calculations based on the config file provided in --generated-files-config

func (*SizeMunger) AddFlags

func (s *SizeMunger) AddFlags(cmd *cobra.Command)

AddFlags will add any request flags to the cobra `cmd`

func (*SizeMunger) MungePullRequest

func (s *SizeMunger) MungePullRequest(config *config.MungeConfig, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent)

MungePullRequest is the workhorse the will actually make updates to the PR

func (SizeMunger) Name

func (SizeMunger) Name() string

Name is the name usable in --pr-mungers

Jump to

Keyboard shortcuts

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