Documentation ¶
Index ¶
- func AreUsersEqual(left []*BasicUser, right []*BasicUser) bool
- func EqualUser(user *BasicUser, other *BasicUser) bool
- type BasicUser
- type ChannelNotification
- type Commit
- type CommitStats
- type MergeRequest
- type NotificationSettings
- type PolicyName
- type Project
- type State
- type Team
- type User
- type UserEvent
- type UserEventType
- type UserLabel
- type UserLabels
- type UserNotification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreUsersEqual ¶
Types ¶
type ChannelNotification ¶
type ChannelNotification struct { // Team is a team that will receive a notification Team *Team // AverageCount of MRs per developer/member AverageCount int // TotalCount of uniq MRs in review state TotalCount int // LastEditedMR is the last edited MR in review state LastEditedMR *MergeRequest // FirstEditedMR is the oldest MR in review state FirstEditedMR *MergeRequest }
ChannelNotification is a set of variables that can be used in channel notification templates.
type Commit ¶
type Commit struct { ID string `bson:"id"` ShortID string `bson:"short_id"` Title string `bson:"title"` AuthorName string `bson:"author_name"` AuthorEmail string `bson:"author_email"` AuthoredDate *time.Time `bson:"authored_date"` CommitterName string `bson:"committer_name"` CommitterEmail string `bson:"committer_email"` CommittedDate *time.Time `bson:"committed_date"` CreatedAt *time.Time `bson:"created_at"` Message string `bson:"message"` ParentIDs []string `bson:"parent_ids"` ProjectID int `bson:"project_id"` Trailers map[string]string `bson:"trailers"` WebURL string `bson:"web_url"` Stats *CommitStats `bson:"stats"` }
type CommitStats ¶
type MergeRequest ¶
type MergeRequest struct { ID int `bson:"id"` IID int `bson:"iid"` ProjectID int `bson:"project_id"` TargetBranch string `bson:"target_branch"` SourceBranch string `bson:"source_branch"` Title string `bson:"title"` Description string `bson:"description"` State State `bson:"state"` Author *BasicUser `bson:"author"` Assignees []*BasicUser `bson:"assignees"` Reviewers []*BasicUser `bson:"reviewers"` Draft bool `bson:"draft"` SHA string `bson:"sha"` URL string `bson:"url"` UpdatedAt *time.Time `bson:"updated_at"` CreatedAt *time.Time `bson:"created_at"` // Additional information Approves []*BasicUser `bson:"approves"` }
func (*MergeRequest) IsEqual ¶
func (a *MergeRequest) IsEqual(b *MergeRequest) bool
IsEqual checks if two merge requests are equal (according to basic information)
type NotificationSettings ¶
type NotificationSettings struct { Enabled bool `bson:"enabled"` Cron string `bson:"cron"` UserTemplate string `bson:"user_template"` ChannelID string `bson:"channel_id"` ChannelTemplate string `bson:"channel_template"` Locale string `bson:"locale"` }
func (NotificationSettings) IsEmpty ¶
func (n NotificationSettings) IsEmpty() bool
type PolicyName ¶
type PolicyName string
type Team ¶
type Team struct { ID string `bson:"_id"` Name string `bson:"name"` Members []*User `bson:"members"` // TODO: add PolicySettings as bson.RawDocument Policy PolicyName `bson:"policy"` Notifications NotificationSettings `bson:"notifications"` CreatedAt time.Time `bson:"created_at"` }
type User ¶
type User struct { *BasicUser `bson:"basic_user"` SlackID string `bson:"slack_id"` Labels UserLabels `bson:"labels"` }
func Developers ¶
Developers returns all developers of a team/list of users
type UserEvent ¶
type UserEvent struct { Type UserEventType UserID string }
type UserLabels ¶
type UserLabels []UserLabel
func (UserLabels) Has ¶
func (u UserLabels) Has(label UserLabel) bool
type UserNotification ¶
type UserNotification struct { // User is a user that will receive a notification User *User // AuthoredMR list of merge requests in review that were authored by the user. AuthoredMR []*MergeRequest // ReviewerMR list of merge requests that should be reviewed. ReviewerMR []*MergeRequest }
UserNotification is a set of variables that can be used in user notification templates.
Click to show internal directories.
Click to hide internal directories.