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
iv
gitlab-ce
Commits
8bfc4645
Commit
8bfc4645
authored
Dec 23, 2015
by
Josh Frye
Committed by
Josh Frye
Jan 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show 'New Merge Request' buttons on canonical repo.
parent
bfb3c8d9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
5 deletions
+29
-5
CHANGELOG
CHANGELOG
+2
-0
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+4
-3
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+3
-2
features/project/fork.feature
features/project/fork.feature
+10
-0
features/steps/project/fork.rb
features/steps/project/fork.rb
+10
-0
No files found.
CHANGELOG
View file @
8bfc4645
...
@@ -91,6 +91,8 @@ v 8.3.0
...
@@ -91,6 +91,8 @@ v 8.3.0
- Do not show build status unless builds are enabled and `.gitlab-ci.yml` is present
- Do not show build status unless builds are enabled and `.gitlab-ci.yml` is present
- Persist runners registration token in database
- Persist runners registration token in database
- Fix online editor should not remove newlines at the end of the file
- Fix online editor should not remove newlines at the end of the file
- Expose Git's version in the admin area
- Show "New Merge Request" buttons on canonical repos when you have a fork (Josh Frye)
v 8.2.3
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
- Fix application settings cache not expiring after changes (Stan Hu)
...
...
app/views/projects/buttons/_dropdown.html.haml
View file @
8bfc4645
...
@@ -8,11 +8,12 @@
...
@@ -8,11 +8,12 @@
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
)
do
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
)
do
=
icon
(
'exclamation-circle fw'
)
=
icon
(
'exclamation-circle fw'
)
New issue
New issue
-
if
can?
(
current_user
,
:create_merge_request
,
@project
)
-
merge_project
=
can?
(
current_user
,
:create_merge_request
,
@project
)
?
@project
:
current_user
.
fork_of
(
@project
)
-
if
merge_project
%li
%li
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@
project
)
do
=
link_to
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_
project
)
do
=
icon
(
'tasks fw'
)
=
icon
(
'tasks fw'
)
New
merge r
equest
New
Merge R
equest
-
if
can?
(
current_user
,
:create_snippet
,
@project
)
-
if
can?
(
current_user
,
:create_snippet
,
@project
)
%li
%li
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
...
...
app/views/projects/merge_requests/index.html.haml
View file @
8bfc4645
...
@@ -6,9 +6,10 @@
...
@@ -6,9 +6,10 @@
.controls
.controls
=
render
'shared/issuable/search_form'
,
path:
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
=
render
'shared/issuable/search_form'
,
path:
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
)
-
if
can?
current_user
,
:create_merge_request
,
@project
-
merge_project
=
can?
(
current_user
,
:create_merge_request
,
@project
)
?
@project
:
current_user
.
fork_of
(
@project
)
-
if
merge_project
.pull-left.hidden-xs
.pull-left.hidden-xs
=
link_to
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@
project
),
class:
"btn btn-new"
,
title:
"New Merge Request"
do
=
link_to
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_
project
),
class:
"btn btn-new"
,
title:
"New Merge Request"
do
%i
.fa.fa-plus
%i
.fa.fa-plus
New Merge Request
New Merge Request
=
render
'shared/issuable/filter'
,
type: :merge_requests
=
render
'shared/issuable/filter'
,
type: :merge_requests
...
...
features/project/fork.feature
View file @
8bfc4645
@forks
Feature
:
Project Fork
Feature
:
Project Fork
Background
:
Background
:
Given
I sign in as a user
Given
I sign in as a user
...
@@ -14,3 +15,12 @@ Feature: Project Fork
...
@@ -14,3 +15,12 @@ Feature: Project Fork
And
I click link
"Fork"
And
I click link
"Fork"
When
I fork to my namespace
When
I fork to my namespace
Then
I should see a
"Name has already been taken"
warning
Then
I should see a
"Name has already been taken"
warning
Scenario
:
Merge request on canonical repo goes to fork merge request page
Given
I click link
"Fork"
And
I fork to my namespace
Then
I should see the forked project page
When
I visit project
"Shop"
page
Then
I should see
"New merge request"
And
I goto the Merge Requests page
Then
I should see
"New merge request"
features/steps/project/fork.rb
View file @
8bfc4645
...
@@ -30,4 +30,14 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
...
@@ -30,4 +30,14 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
click_link
current_user
.
name
click_link
current_user
.
name
end
end
end
end
step
'I should see "New Merge Request"'
do
expect
(
page
).
to
have_content
"New Merge Request"
end
step
'I goto the Merge Requests page'
do
page
.
within
'.page-sidebar-expanded'
do
click_link
"Merge Requests"
end
end
end
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