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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
b896880e
Commit
b896880e
authored
Sep 16, 2012
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method name changed
parent
549c4c22
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
lib/api/helpers.rb
lib/api/helpers.rb
+1
-1
lib/api/issues.rb
lib/api/issues.rb
+2
-2
lib/api/milestones.rb
lib/api/milestones.rb
+2
-2
lib/api/projects.rb
lib/api/projects.rb
+3
-3
No files found.
lib/api/helpers.rb
View file @
b896880e
...
...
@@ -28,7 +28,7 @@ module Gitlab
end
end
def
existed_attribute
s
(
keys
)
def
attributes_for_key
s
(
keys
)
attrs
=
{}
keys
.
each
do
|
key
|
attrs
[
key
]
=
params
[
key
]
if
params
[
key
].
present?
...
...
lib/api/issues.rb
View file @
b896880e
...
...
@@ -48,7 +48,7 @@ module Gitlab
# Example Request:
# POST /projects/:id/issues
post
":id/issues"
do
attrs
=
existed_attribute
s
[
:title
,
:description
,
:assignee_id
,
:milestone_id
]
attrs
=
attributes_for_key
s
[
:title
,
:description
,
:assignee_id
,
:milestone_id
]
attrs
[
:label_list
]
=
params
[
:labels
]
if
params
[
:labels
].
present?
@issue
=
user_project
.
issues
.
new
attrs
@issue
.
author
=
current_user
...
...
@@ -76,7 +76,7 @@ module Gitlab
@issue
=
user_project
.
issues
.
find
(
params
[
:issue_id
])
authorize!
:modify_issue
,
@issue
attrs
=
existed_attribute
s
[
:title
,
:description
,
:assignee_id
,
:milestone_id
,
:closed
]
attrs
=
attributes_for_key
s
[
:title
,
:description
,
:assignee_id
,
:milestone_id
,
:closed
]
attrs
[
:label_list
]
=
params
[
:labels
]
if
params
[
:labels
].
present?
if
@issue
.
update_attributes
attrs
present
@issue
,
with:
Entities
::
Issue
...
...
lib/api/milestones.rb
View file @
b896880e
...
...
@@ -36,7 +36,7 @@ module Gitlab
# Example Request:
# POST /projects/:id/milestones
post
":id/milestones"
do
attrs
=
existed_attribute
s
[
:title
,
:description
,
:due_date
]
attrs
=
attributes_for_key
s
[
:title
,
:description
,
:due_date
]
@milestone
=
user_project
.
milestones
.
new
attrs
if
@milestone
.
save
present
@milestone
,
with:
Entities
::
Milestone
...
...
@@ -60,7 +60,7 @@ module Gitlab
authorize!
:admin_milestone
,
user_project
@milestone
=
user_project
.
milestones
.
find
(
params
[
:milestone_id
])
attrs
=
existed_attribute
s
[
:title
,
:description
,
:due_date
,
:closed
]
attrs
=
attributes_for_key
s
[
:title
,
:description
,
:due_date
,
:closed
]
if
@milestone
.
update_attributes
attrs
present
@milestone
,
with:
Entities
::
Milestone
else
...
...
lib/api/projects.rb
View file @
b896880e
...
...
@@ -40,7 +40,7 @@ module Gitlab
post
do
params
[
:code
]
||=
params
[
:name
]
params
[
:path
]
||=
params
[
:name
]
attrs
=
existed_attribute
s
[
:code
,
attrs
=
attributes_for_key
s
[
:code
,
:path
,
:name
,
:description
,
...
...
@@ -207,7 +207,7 @@ module Gitlab
# Example Request:
# POST /projects/:id/snippets
post
":id/snippets"
do
attrs
=
existed_attribute
s
[
:title
,
:file_name
]
attrs
=
attributes_for_key
s
[
:title
,
:file_name
]
attrs
[
:expires_at
]
=
params
[
:lifetime
]
if
params
[
:lifetime
].
present?
attrs
[
:content
]
=
params
[
:code
]
if
params
[
:code
].
present?
@snippet
=
user_project
.
snippets
.
new
attrs
...
...
@@ -235,7 +235,7 @@ module Gitlab
@snippet
=
user_project
.
snippets
.
find
(
params
[
:snippet_id
])
authorize!
:modify_snippet
,
@snippet
attrs
=
existed_attribute
s
[
:title
,
:file_name
]
attrs
=
attributes_for_key
s
[
:title
,
:file_name
]
attrs
[
:expires_at
]
=
params
[
:lifetime
]
if
params
[
:lifetime
].
present?
attrs
[
:content
]
=
params
[
:code
]
if
params
[
:code
].
present?
...
...
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