1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Add gerrit widget

This commit is contained in:
Anand Sudhir Prayaga
2018-06-27 15:59:50 +02:00
committed by Chris Cummer
parent 0ffbf66f88
commit 79d4f04f0c
5 changed files with 48 additions and 46 deletions

View File

@@ -68,8 +68,8 @@ type Deployment struct {
// https://docs.gitlab.com/ce/api/deployments.html#list-project-deployments
type ListProjectDeploymentsOptions struct {
ListOptions
OrderBy *OrderByValue `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
}
// ListProjectDeployments gets a list of deployments in a project.

View File

@@ -186,19 +186,6 @@ var notificationLevelTypes = map[string]NotificationLevelValue{
"custom": CustomNotificationLevel,
}
// OrderByValue represent in which order to sort the item
type OrderByValue string
// These constants represent all valid order by values.
const (
OrderByCreatedAt OrderByValue = "created_at"
OrderByID OrderByValue = "id"
OrderByIID OrderByValue = "iid"
OrderByRef OrderByValue = "ref"
OrderByStatus OrderByValue = "status"
OrderByUserID OrderByValue = "user_id"
)
// VisibilityValue represents a visibility level within GitLab.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/
@@ -832,14 +819,6 @@ func NotificationLevel(v NotificationLevelValue) *NotificationLevelValue {
return p
}
// OrderBy is a helper routine that allocates a new OrderByValue
// to store v and returns a pointer to it.
func OrderBy(v OrderByValue) *OrderByValue {
p := new(OrderByValue)
*p = v
return p
}
// Visibility is a helper routine that allocates a new VisibilityValue
// to store v and returns a pointer to it.
func Visibility(v VisibilityValue) *VisibilityValue {

View File

@@ -87,7 +87,7 @@ type ListProjectPipelinesOptions struct {
YamlErrors *bool `url:"yaml_errors,omitempty" json:"yaml_errors,omitempty"`
Name *string `url:"name,omitempty" json:"name,omitempty"`
Username *string `url:"username,omitempty" json:"username,omitempty"`
OrderBy *OrderByValue `url:"order_by,omitempty" json:"order_by,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
}