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
bb0543ef
Commit
bb0543ef
authored
Nov 06, 2017
by
micael.bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore the column before the migration
reword the changelog remove dead code in the specs
parent
6c1c64d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
8 deletions
+5
-8
app/models/merge_request.rb
app/models/merge_request.rb
+2
-1
changelogs/unreleased/remove-ensure-ref-fetched-from-controllers.yml
...unreleased/remove-ensure-ref-fetched-from-controllers.yml
+1
-1
spec/factories/merge_requests.rb
spec/factories/merge_requests.rb
+2
-2
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+0
-2
spec/requests/api/v3/merge_requests_spec.rb
spec/requests/api/v3/merge_requests_spec.rb
+0
-2
No files found.
app/models/merge_request.rb
View file @
bb0543ef
...
...
@@ -8,7 +8,8 @@ class MergeRequest < ActiveRecord::Base
include
CreatedAtFilterable
include
TimeTrackable
ignore_column
:locked_at
ignore_column
:locked_at
,
:ref_fetched
belongs_to
:target_project
,
class_name:
"Project"
belongs_to
:source_project
,
class_name:
"Project"
...
...
changelogs/unreleased/remove-ensure-ref-fetched-from-controllers.yml
View file @
bb0543ef
---
title
:
Removed merge requests fetching their refs on every action
.
title
:
Stop merge requests from fetching their refs when the data is already available
.
merge_request
:
15129
author
:
type
:
removed
spec/factories/merge_requests.rb
View file @
bb0543ef
...
...
@@ -83,10 +83,10 @@ FactoryGirl.define do
target_project
=
merge_request
.
target_project
source_project
=
merge_request
.
source_project
# Fake `
write_ref
` if we don't have repository
# Fake `
fetch_ref!
` if we don't have repository
# We have too many existing tests replying on this behaviour
unless
[
target_project
,
source_project
].
all?
(
&
:repository_exists?
)
allow
(
merge_request
).
to
receive
(
:
write_ref
)
allow
(
merge_request
).
to
receive
(
:
fetch_ref!
)
end
end
...
...
spec/requests/api/merge_requests_spec.rb
View file @
bb0543ef
...
...
@@ -623,8 +623,6 @@ describe API::MergeRequests do
before
do
forked_project
.
add_reporter
(
user2
)
allow_any_instance_of
(
MergeRequest
).
to
receive
(
:write_ref
)
end
it
"returns merge_request"
do
...
...
spec/requests/api/v3/merge_requests_spec.rb
View file @
bb0543ef
...
...
@@ -319,8 +319,6 @@ describe API::MergeRequests do
before
do
forked_project
.
add_reporter
(
user2
)
allow_any_instance_of
(
MergeRequest
).
to
receive
(
:write_ref
)
end
it
"returns merge_request"
do
...
...
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