BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
20486593
Commit
20486593
authored
Mar 27, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip MR metrics when importing projects from GitHub
parent
336ba94a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
importable.rb
app/models/concerns/importable.rb
+3
-0
issuable.rb
app/models/concerns/issuable.rb
+2
-1
merge_request.rb
app/models/merge_request.rb
+0
-1
pull_request_formatter.rb
lib/gitlab/github_import/pull_request_formatter.rb
+2
-1
No files found.
app/models/concerns/importable.rb
View file @
20486593
...
...
@@ -3,4 +3,7 @@ module Importable
attr_accessor
:importing
alias_method
:importing?
,
:importing
attr_accessor
:skip_metrics
alias_method
:skip_metrics?
,
:skip_metrics
end
app/models/concerns/issuable.rb
View file @
20486593
...
...
@@ -14,6 +14,7 @@ module Issuable
include
Awardable
include
Taskable
include
TimeTrackable
include
Importable
# This object is used to gather issuable meta data for displaying
# upvotes, downvotes, notes and closing merge requests count for issues and merge requests
...
...
@@ -99,7 +100,7 @@ module Issuable
acts_as_paranoid
after_save
:update_assignee_cache_counts
,
if: :assignee_id_changed?
after_save
:record_metrics
after_save
:record_metrics
,
unless: :skip_metrics?
def
update_assignee_cache_counts
# make sure we flush the cache for both the old *and* new assignees(if they exist)
...
...
app/models/merge_request.rb
View file @
20486593
...
...
@@ -3,7 +3,6 @@ class MergeRequest < ActiveRecord::Base
include
Issuable
include
Referable
include
Sortable
include
Importable
belongs_to
:target_project
,
class_name:
"Project"
belongs_to
:source_project
,
class_name:
"Project"
...
...
lib/gitlab/github_import/pull_request_formatter.rb
View file @
20486593
...
...
@@ -20,7 +20,8 @@ module Gitlab
author_id:
author_id
,
assignee_id:
assignee_id
,
created_at:
raw_data
.
created_at
,
updated_at:
raw_data
.
updated_at
updated_at:
raw_data
.
updated_at
,
skip_metrics:
true
}
end
...
...
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