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
Kazuhiko Shiozaki
gitlab-ce
Commits
7d1c0679
Commit
7d1c0679
authored
Aug 12, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'note-query-information' into 'master'
Note query information See merge request !1149
parents
e956d116
95f8f7c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
app/models/note.rb
app/models/note.rb
+4
-0
doc/api/notes.md
doc/api/notes.md
+8
-2
lib/api/entities.rb
lib/api/entities.rb
+3
-0
No files found.
app/models/note.rb
View file @
7d1c0679
...
...
@@ -360,6 +360,10 @@ class Note < ActiveRecord::Base
create_new_cross_references!
(
project
,
author
)
end
def
system?
read_attribute
(
:system
)
end
def
editable?
!
read_attribute
(
:system
)
end
...
...
doc/api/notes.md
View file @
7d1c0679
...
...
@@ -31,7 +31,10 @@ Parameters:
"state"
:
"active"
,
"created_at"
:
"2013-09-30T13:46:01Z"
},
"created_at"
:
"2013-10-02T09:22:45Z"
"created_at"
:
"2013-10-02T09:22:45Z"
,
"system"
:
true
,
"upvote"
:
false
,
"downvote"
:
false
},
{
"id"
:
305
,
...
...
@@ -45,7 +48,10 @@ Parameters:
"state"
:
"active"
,
"created_at"
:
"2013-09-30T13:46:01Z"
},
"created_at"
:
"2013-10-02T09:56:03Z"
"created_at"
:
"2013-10-02T09:56:03Z"
,
"system"
:
false
,
"upvote"
:
false
,
"downvote"
:
false
}
]
```
...
...
lib/api/entities.rb
View file @
7d1c0679
...
...
@@ -205,6 +205,9 @@ module API
expose
:attachment_identifier
,
as: :attachment
expose
:author
,
using:
Entities
::
UserBasic
expose
:created_at
expose
:system?
,
as: :system
expose
:upvote?
,
as: :upvote
expose
:downvote?
,
as: :downvote
end
class
MRNote
<
Grape
::
Entity
...
...
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