From 6ac8bb0f7ccd7b1f10909aea62b1d8493fc0574a Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Tue, 16 Dec 2014 20:03:28 -0200 Subject: [PATCH 1/3] Add description attribute to group API (GET and POST) --- lib/api/entities.rb | 2 +- lib/api/groups.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 2fea151aeb3..ac166ed4fba 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -65,7 +65,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :owner_id + expose :id, :name, :path, :owner_id, :description end class GroupDetail < Group diff --git a/lib/api/groups.rb b/lib/api/groups.rb index bda60b3b7d5..730dfad52c8 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -47,7 +47,7 @@ module API authenticated_as_admin! required_attributes! [:name, :path] - attrs = attributes_for_keys [:name, :path] + attrs = attributes_for_keys [:name, :path, :description] @group = Group.new(attrs) @group.owner = current_user From ad18fcd0e61d2d6826a8e478345c3cd9b59049c5 Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Wed, 17 Dec 2014 11:11:24 -0200 Subject: [PATCH 2/3] Document the `description` attribute of groups API --- doc/api/groups.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/groups.md b/doc/api/groups.md index 8aae4f6b1bb..e6893d71774 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -14,7 +14,8 @@ GET /groups "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18 + "owner_id": 18, + "description": "An interesting group" } ] ``` @@ -45,6 +46,7 @@ Parameters: - `name` (required) - The name of the group - `path` (required) - The path of the group +- `description` (optional) - The group's description ## Transfer project to group From bb80bf3612b9fe47a4a5b11645ad494fe169f586 Mon Sep 17 00:00:00 2001 From: Daniel Serodio Date: Wed, 17 Dec 2014 18:54:10 -0200 Subject: [PATCH 3/3] Update changelog --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 387d42a7aca..f2f6e0ce8bb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ v 7.8.0 - Replace highlight.js with rouge-fork rugments (Stefan Tatschner) - - - - + - Expose description in groups API - - -