Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
bf9a6c437ef1
Commit
f08f921d
authored
Dec 03, 2015
by
Grzegorz Bizon
Browse files
Support emoji awards also in merge requests
parent
2929df3fc99e
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/note.rb
View file @
bf9a6c43
...
...
@@ -361,7 +361,7 @@ def editable?
# Method is executed as a before_validation callback.
#
def
set_award!
return
unless
issue_comment
?
&&
contains_emoji_only?
return
unless
supports_awards
?
&&
contains_emoji_only?
self
.
is_award
=
true
self
.
note
=
award_emoji_name
...
...
@@ -369,8 +369,9 @@ def set_award!
private
def
issue_comment?
noteable
.
kind_of?
(
Issue
)
def
supports_awards?
noteable
.
kind_of?
(
Issue
)
||
noteable
.
is_a?
(
MergeRequest
)
end
def
contains_emoji_only?
...
...
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