Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
0533ae7e
Commit
0533ae7e
authored
Jan 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8464 from dserodio/group-api-description
Add description attribute to group API (GET and POST)
parents
57c121aa
bb80bf36
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
CHANGELOG
CHANGELOG
+1
-1
doc/api/groups.md
doc/api/groups.md
+3
-1
lib/api/entities.rb
lib/api/entities.rb
+1
-1
lib/api/groups.rb
lib/api/groups.rb
+1
-1
No files found.
CHANGELOG
View file @
0533ae7e
...
...
@@ -4,7 +4,7 @@ v 7.8.0
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
-
-
-
-
Expose description in groups API
-
-
-
...
...
doc/api/groups.md
View file @
0533ae7e
...
...
@@ -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
...
...
lib/api/entities.rb
View file @
0533ae7e
...
...
@@ -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
...
...
lib/api/groups.rb
View file @
0533ae7e
...
...
@@ -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
...
...
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