Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
79dad8e7
Unverified
Commit
79dad8e7
authored
Jun 29, 2018
by
Sander van Harmelen
Committed by
GitHub
Jun 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the OrderByValue type (#429)
parent
6ada4440
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
25 deletions
+4
-25
deployments.go
deployments.go
+2
-2
pipelines.go
examples/pipelines.go
+1
-1
gitlab.go
gitlab.go
+0
-21
pipelines.go
pipelines.go
+1
-1
No files found.
deployments.go
View file @
79dad8e7
...
...
@@ -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.
...
...
examples/pipelines.go
View file @
79dad8e7
...
...
@@ -17,7 +17,7 @@ func pipelineExample() {
YamlErrors
:
gitlab
.
Bool
(
true
),
Name
:
gitlab
.
String
(
"name"
),
Username
:
gitlab
.
String
(
"username"
),
OrderBy
:
gitlab
.
OrderBy
(
gitlab
.
OrderByStatus
),
OrderBy
:
gitlab
.
String
(
"status"
),
Sort
:
gitlab
.
String
(
"asc"
),
}
...
...
gitlab.go
View file @
79dad8e7
...
...
@@ -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
{
...
...
pipelines.go
View file @
79dad8e7
...
...
@@ -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"`
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment