Documentation ¶
Index ¶
- Constants
- Variables
- func ClearAllCommitQueues() (int, error)
- func InsertQueue(q *CommitQueue) error
- func NewCommitQueueDequeueLogger(name string, l send.LevelInfo) (send.Sender, error)
- func NewDequeueItemMessage(p level.Priority, dequeueMsg DequeueItem) message.Composer
- func NewGithubMergePRMessage(p level.Priority, mergeMsg GithubMergePR) message.Composer
- func NewGithubPRLogger(ctx context.Context, name string, token string, statusSender send.Sender) (send.Sender, error)
- func NewMockGithubPRLogger(name string, errLogger *mockErrorLogger) (send.Sender, error)
- func SetupEnv(env evergreen.Environment) error
- func TriggersCommitQueue(commentAction string, comment string) bool
- type CommitQueue
- func (q *CommitQueue) Enqueue(item CommitQueueItem) (int, error)
- func (q *CommitQueue) FindItem(issue string) int
- func (q *CommitQueue) MarshalBSON() ([]byte, error)
- func (q *CommitQueue) Next() *CommitQueueItem
- func (q *CommitQueue) Remove(issue string) (bool, error)
- func (q *CommitQueue) SetProcessing(status bool) error
- func (q *CommitQueue) UnmarshalBSON(in []byte) error
- type CommitQueueItem
- type DequeueItem
- type GithubMergePR
- type Module
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") )
Functions ¶
func ClearAllCommitQueues ¶
func InsertQueue ¶
func InsertQueue(q *CommitQueue) error
func NewCommitQueueDequeueLogger ¶
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 ¶
Mock implementation
func SetupEnv ¶
func SetupEnv(env evergreen.Environment) error
func TriggersCommitQueue ¶
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) SetProcessing ¶
func (q *CommitQueue) SetProcessing(status bool) error
func (*CommitQueue) UnmarshalBSON ¶
func (q *CommitQueue) UnmarshalBSON(in []byte) error
type CommitQueueItem ¶
func (*CommitQueueItem) MarshalBSON ¶
func (i *CommitQueueItem) MarshalBSON() ([]byte, error)
func (*CommitQueueItem) UnmarshalBSON ¶
func (i *CommitQueueItem) UnmarshalBSON(in []byte) error
type DequeueItem ¶
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
Click to show internal directories.
Click to hide internal directories.