commitqueue

package
v0.0.0-...-418c65a Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 18 Imported by: 0 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

Index

Constants

View Source
const (
	PRPatchType  = "PR"
	CLIPatchType = "CLI"
)
View Source
const Collection = "commit_queue"
View Source
const Context = "evergreen/commitqueue"

Variables

View Source
var (
	// bson fields for the CommitQueue struct
	IdKey          = bsonutil.MustHaveTag(CommitQueue{}, "ProjectID")
	QueueKey       = bsonutil.MustHaveTag(CommitQueue{}, "Queue")
	ProcessingKey  = bsonutil.MustHaveTag(CommitQueue{}, "Processing")
	IssueKey       = bsonutil.MustHaveTag(CommitQueueItem{}, "Issue")
	VersionKey     = bsonutil.MustHaveTag(CommitQueueItem{}, "Version")
	EnqueueTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, "EnqueueTime")
)

Functions

func ClearAllCommitQueues

func ClearAllCommitQueues() (int, error)

func InsertQueue

func InsertQueue(q *CommitQueue) error

func NewCommitQueueDequeueLogger

func NewCommitQueueDequeueLogger(name string, l send.LevelInfo) (send.Sender, error)

NewCommitQueueDequeueLogger constructs a Sender that dequeues an item from a commit queue

func NewDequeueItemMessage

func NewDequeueItemMessage(p level.Priority, dequeueMsg DequeueItem) message.Composer

NewDequeueItemMessage returns a composer for DequeueItem messages

func NewGithubMergePRMessage

func NewGithubMergePRMessage(p level.Priority, mergeMsg GithubMergePR) message.Composer

NewGithubMergePRMessage returns a composer for GithubMergePR messages

func NewGithubPRLogger

func NewGithubPRLogger(ctx context.Context, name string, token string, statusSender send.Sender) (send.Sender, error)

NewGithubPRLogger creates a new Sender implementation that merges a pull request Specify an OAuth token for GitHub authentication

func NewMockGithubPRLogger

func NewMockGithubPRLogger(name string, errLogger *mockErrorLogger) (send.Sender, error)

Mock implementation

func SetupEnv

func SetupEnv(env evergreen.Environment) error

func TriggersCommitQueue

func TriggersCommitQueue(commentAction string, comment string) bool

Types

type CommitQueue

type CommitQueue struct {
	ProjectID  string            `bson:"_id"`
	Processing bool              `bson:"processing"`
	Queue      []CommitQueueItem `bson:"queue,omitempty"`
}

func FindOneId

func FindOneId(id string) (*CommitQueue, error)

func (*CommitQueue) Enqueue

func (q *CommitQueue) Enqueue(item CommitQueueItem) (int, error)

func (*CommitQueue) FindItem

func (q *CommitQueue) FindItem(issue string) int

func (*CommitQueue) MarshalBSON

func (q *CommitQueue) MarshalBSON() ([]byte, error)

func (*CommitQueue) Next

func (q *CommitQueue) Next() *CommitQueueItem

func (*CommitQueue) Remove

func (q *CommitQueue) Remove(issue string) (bool, error)

func (*CommitQueue) SetProcessing

func (q *CommitQueue) SetProcessing(status bool) error

func (*CommitQueue) UnmarshalBSON

func (q *CommitQueue) UnmarshalBSON(in []byte) error

func (*CommitQueue) UpdateVersion

func (q *CommitQueue) UpdateVersion(item CommitQueueItem) error

type CommitQueueItem

type CommitQueueItem struct {
	Issue       string    `bson:"issue"`
	Version     string    `bson:"version,omitempty"`
	EnqueueTime time.Time `bson:"enqueue_time"`
	Modules     []Module  `bson:"modules"`
}

func (*CommitQueueItem) MarshalBSON

func (i *CommitQueueItem) MarshalBSON() ([]byte, error)

func (*CommitQueueItem) UnmarshalBSON

func (i *CommitQueueItem) UnmarshalBSON(in []byte) error

type DequeueItem

type DequeueItem struct {
	ProjectID string
	Item      string
	Status    string
}

type GithubMergePR

type GithubMergePR struct {
	Status      string         `bson:"status"`
	PatchID     string         `bson:"patch_id"`
	URL         string         `bson:"url"`
	ProjectID   string         `bson:"project_id"`
	MergeMethod string         `bson:"merge_method"`
	Item        string         `bson:"item"`
	PRs         []event.PRInfo `bson:"prs"`
}

func (*GithubMergePR) MarshalBSON

func (m *GithubMergePR) MarshalBSON() ([]byte, error)

func (*GithubMergePR) UnmarshalBSON

func (m *GithubMergePR) UnmarshalBSON(in []byte) error

func (*GithubMergePR) Valid

func (p *GithubMergePR) Valid() error

Valid returns nil if the message is well formed

type Module

type Module struct {
	Module string `bson:"module" json:"module"`
	Issue  string `bson:"issue" json:"issue"`
}

func (*Module) MarshalBSON

func (m *Module) MarshalBSON() ([]byte, error)

func (*Module) UnmarshalBSON

func (m *Module) UnmarshalBSON(in []byte) error

Jump to

Keyboard shortcuts

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