pulls

package
v0.0.0-...-1eb392f Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2015 License: Apache-2.0 Imports: 10 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 HasLabel

func HasLabel(labels []github.Label, name string) bool

func MungePullRequests

func MungePullRequests(client *github.Client, pullMungers, org, project string, minPRNumber int, dryrun bool) error

func RegisterMunger

func RegisterMunger(munger Munger) error

func RegisterMungerOrDie

func RegisterMungerOrDie(munger Munger)

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)

func (*BlunderbussConfig) FindOwners

func (b *BlunderbussConfig) FindOwners(filename string) []string

type BlunderbussMunger

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

func (*BlunderbussMunger) MungePullRequest

func (b *BlunderbussMunger) MungePullRequest(client *github.Client, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)

func (*BlunderbussMunger) Name

func (b *BlunderbussMunger) Name() string

type LGTMAfterCommitMunger

type LGTMAfterCommitMunger struct{}

func (LGTMAfterCommitMunger) MungePullRequest

func (LGTMAfterCommitMunger) MungePullRequest(client *github.Client, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)

func (LGTMAfterCommitMunger) Name

type Munger

type Munger interface {
	// Take action on a specific pull request includes:
	//   * The org/user pair for the PR
	//   * The PR object
	//   * The issue object for the PR, github stores some things (e.g. labels) in an "issue" object with the same number as the PR
	//   * The commits for the PR
	//   * The events on the PR
	//   * dryrun, if true, the munger should take no action, and only report what it would have done.
	MungePullRequest(client *github.Client, org, user string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)
	Name() string
}

type RemoveNeedsRebaseMunger

type RemoveNeedsRebaseMunger struct{}

func (RemoveNeedsRebaseMunger) MungePullRequest

func (RemoveNeedsRebaseMunger) MungePullRequest(client *github.Client, org, project string, pr *github.PullRequest, issue *github.Issue, commits []github.RepositoryCommit, events []github.IssueEvent, dryrun bool)

func (RemoveNeedsRebaseMunger) Name

Jump to

Keyboard shortcuts

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