Commit 156465cedd0a7b1219f4164d13125cab8b7a0337
Exists in
spb-stable
and in
3 other branches
Merge pull request #6747 from mrts/expose-event-and-mergerequest-timestamps-in-api
Expose event and mergerequest timestamps in API
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
CHANGELOG
@@ -15,6 +15,7 @@ v 6.8.0 | @@ -15,6 +15,7 @@ v 6.8.0 | ||
15 | - Option to disable standard login | 15 | - Option to disable standard login |
16 | - Clean old created archives from repository downloads directory | 16 | - Clean old created archives from repository downloads directory |
17 | - Fix download link for huge MR diffs | 17 | - Fix download link for huge MR diffs |
18 | + - Expose event and mergerequest timestamps in API | ||
18 | 19 | ||
19 | v 6.7.3 | 20 | v 6.7.3 |
20 | - Fix the merge notification email not being sent (Pierre de La Morinerie) | 21 | - Fix the merge notification email not being sent (Pierre de La Morinerie) |
lib/api/entities.rb
@@ -117,22 +117,22 @@ module API | @@ -117,22 +117,22 @@ module API | ||
117 | class ProjectEntity < Grape::Entity | 117 | class ProjectEntity < Grape::Entity |
118 | expose :id, :iid | 118 | expose :id, :iid |
119 | expose (:project_id) { |entity| entity.project.id } | 119 | expose (:project_id) { |entity| entity.project.id } |
120 | + expose :title, :description | ||
121 | + expose :state, :created_at, :updated_at | ||
120 | end | 122 | end |
121 | 123 | ||
122 | class Milestone < ProjectEntity | 124 | class Milestone < ProjectEntity |
123 | - expose :title, :description, :due_date, :state, :updated_at, :created_at | 125 | + expose :due_date |
124 | end | 126 | end |
125 | 127 | ||
126 | class Issue < ProjectEntity | 128 | class Issue < ProjectEntity |
127 | - expose :title, :description | ||
128 | expose :label_list, as: :labels | 129 | expose :label_list, as: :labels |
129 | expose :milestone, using: Entities::Milestone | 130 | expose :milestone, using: Entities::Milestone |
130 | expose :assignee, :author, using: Entities::UserBasic | 131 | expose :assignee, :author, using: Entities::UserBasic |
131 | - expose :state, :updated_at, :created_at | ||
132 | end | 132 | end |
133 | 133 | ||
134 | class MergeRequest < ProjectEntity | 134 | class MergeRequest < ProjectEntity |
135 | - expose :target_branch, :source_branch, :title, :state, :upvotes, :downvotes, :description | 135 | + expose :target_branch, :source_branch, :upvotes, :downvotes |
136 | expose :author, :assignee, using: Entities::UserBasic | 136 | expose :author, :assignee, using: Entities::UserBasic |
137 | expose :source_project_id, :target_project_id | 137 | expose :source_project_id, :target_project_id |
138 | end | 138 | end |
@@ -158,6 +158,7 @@ module API | @@ -158,6 +158,7 @@ module API | ||
158 | expose :title, :project_id, :action_name | 158 | expose :title, :project_id, :action_name |
159 | expose :target_id, :target_type, :author_id | 159 | expose :target_id, :target_type, :author_id |
160 | expose :data, :target_title | 160 | expose :data, :target_title |
161 | + expose :created_at | ||
161 | end | 162 | end |
162 | 163 | ||
163 | class Namespace < Grape::Entity | 164 | class Namespace < Grape::Entity |