pulls

package
v0.0.0-...-e055bc0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package pulls deals with munging of github pull requests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelsWithPrefix

func GetLabelsWithPrefix(labels []github.Label, prefix string) []string

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 PRSizeMunger

type PRSizeMunger struct{}

func (PRSizeMunger) MungePullRequest

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

func (PRSizeMunger) Name

func (PRSizeMunger) 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