commitqueue

package
v0.0.0-...-9cb08ad Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 20 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 (
	SourcePullRequest = "PR"
	SourceDiff        = "diff"
)
View Source
const Collection = "commit_queue"
View Source
const (
	GithubContext = "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")
	ProcessingUpdatedTimeKey = bsonutil.MustHaveTag(CommitQueue{}, "ProcessingUpdatedTime")
	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 TriggersCommitQueue

func TriggersCommitQueue(commentAction string, comment string) bool

Types

type CommitQueue

type CommitQueue struct {
	ProjectID             string            `bson:"_id"`
	Processing            bool              `bson:"processing"`
	ProcessingUpdatedTime time.Time         `bson:"processing_updated_time"`
	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) EnqueueAtFront

func (q *CommitQueue) EnqueueAtFront(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, bool)

func (*CommitQueue) Remove

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

func (*CommitQueue) RemoveItemAndPreventMerge

func (cq *CommitQueue) RemoveItemAndPreventMerge(issue string, versionExists bool, user string) (*CommitQueueItem, 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"`
	MessageOverride string    `bson:"message_override"`
	Source          string    `bson:"source"`
}

func RemoveCommitQueueItemForVersion

func RemoveCommitQueueItemForVersion(projectId, version string, user string) (*CommitQueueItem, error)

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
}

func (*DequeueItem) Send

func (d *DequeueItem) Send() error

func (*DequeueItem) String

func (d *DequeueItem) String() string

func (*DequeueItem) Valid

func (d *DequeueItem) Valid() bool

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"`
	// contains filtered or unexported fields
}

func (*GithubMergePR) Initialize

func (s *GithubMergePR) Initialize(env evergreen.Environment) error

func (*GithubMergePR) Send

func (s *GithubMergePR) Send() (err error)

func (*GithubMergePR) String

func (s *GithubMergePR) String() string

func (*GithubMergePR) Valid

func (s *GithubMergePR) Valid() bool

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