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
Boxiang Sun
gitlab-ce
Commits
db926729
Commit
db926729
authored
May 30, 2018
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure metrics regardless of being imported on MRs
parent
54ad5fb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+0
-2
app/models/issue.rb
app/models/issue.rb
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
No files found.
app/models/concerns/issuable.rb
View file @
db926729
...
...
@@ -97,8 +97,6 @@ module Issuable
strip_attributes
:title
after_save
:ensure_metrics
,
unless: :imported?
# We want to use optimistic lock for cases when only title or description are involved
# http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
def
locking_enabled?
...
...
app/models/issue.rb
View file @
db926729
...
...
@@ -59,6 +59,7 @@ class Issue < ActiveRecord::Base
scope
:public_only
,
->
{
where
(
confidential:
false
)
}
after_save
:expire_etag_cache
after_save
:ensure_metrics
,
unless: :imported?
attr_spammable
:title
,
spam_title:
true
attr_spammable
:description
,
spam_description:
true
...
...
app/models/merge_request.rb
View file @
db926729
...
...
@@ -58,6 +58,7 @@ class MergeRequest < ActiveRecord::Base
after_create
:ensure_merge_request_diff
,
unless: :importing?
after_update
:clear_memoized_shas
after_update
:reload_diff_if_branch_changed
after_save
:ensure_metrics
# When this attribute is true some MR validation is ignored
# It allows us to close or modify broken merge requests
...
...
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