Skip to content

Commit 745dbda

Browse files
author
Stephane Leclercq
committed
Add CreatedAt and UpdatedAt fields to MergeRequest struct
1 parent eb0d237 commit 745dbda

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

examples/projects/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func main() {
195195
}
196196

197197
for _, mr := range mrs {
198-
fmt.Printf("> [%d] %s (+%d) by %s. WIP : %t\n", mr.Id, mr.Title, mr.Upvotes, mr.Author.Name, mr.WorkInProgress)
198+
fmt.Printf("> [%d] %s (+%d) by %s on %s.\n", mr.Id, mr.Title, mr.Upvotes, mr.Author.Name, mr.CreatedAt)
199199
}
200200

201201
}

merge_requests.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type MergeRequest struct {
2323
ProjectId int `json:"project_id,omitempty"`
2424
Title string `json:"title,omitempty"`
2525
State string `json:"state,omitempty"`
26+
CreatedAt string `json:"created_at,omitempty"`
27+
UpdatedAt string `json:"updated_at,omitempty"`
2628
Upvotes int `json:"upvotes,omitempty"`
2729
Downvotes int `json:"downvotes,omitempty"`
2830
Author *User `json:"author,omitempty"`

stubs/merge_requests/index.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"project_id": 3,
88
"title": "test1",
99
"state": "opened",
10+
"created_at": "2016-05-20T13:58:19.283Z",
11+
"updated_at": "2016-05-20T13:58:19.283Z",
1012
"upvotes": 0,
1113
"downvotes": 0,
1214
"author": {

stubs/merge_requests/show.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"project_id": 3,
77
"title": "test1",
88
"state": "merged",
9+
"created_at": "2016-05-20T13:58:19.283Z",
10+
"updated_at": "2016-05-20T13:58:19.283Z",
911
"upvotes": 0,
1012
"downvotes": 0,
1113
"author": {

0 commit comments

Comments
 (0)