Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
8bfc4645
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8bfc4645
编写于
12月 23, 2015
作者:
J
Josh Frye
提交者:
Josh Frye
1月 03, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show 'New Merge Request' buttons on canonical repo.
上级
bfb3c8d9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
5 deletion
+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
未找到文件。
CHANGELOG
浏览文件 @
8bfc4645
...
...
@@ -91,6 +91,8 @@ v 8.3.0
- Do not show build status unless builds are enabled and `.gitlab-ci.yml` is present
- Persist runners registration token in database
- 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
- Fix application settings cache not expiring after changes (Stan Hu)
...
...
app/views/projects/buttons/_dropdown.html.haml
浏览文件 @
8bfc4645
...
...
@@ -8,11 +8,12 @@
=
link_to
url_for_new_issue
(
@project
,
only_path:
true
)
do
=
icon
(
'exclamation-circle fw'
)
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
=
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'
)
New
merge r
equest
New
Merge R
equest
-
if
can?
(
current_user
,
:create_snippet
,
@project
)
%li
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
do
...
...
app/views/projects/merge_requests/index.html.haml
浏览文件 @
8bfc4645
...
...
@@ -6,9 +6,10 @@
.controls
=
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
=
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
New Merge Request
=
render
'shared/issuable/filter'
,
type: :merge_requests
...
...
features/project/fork.feature
浏览文件 @
8bfc4645
@forks
Feature
:
Project Fork
Background
:
Given
I sign in as a user
...
...
@@ -14,3 +15,12 @@ Feature: Project Fork
And
I click link
"Fork"
When
I fork to my namespace
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
浏览文件 @
8bfc4645
...
...
@@ -30,4 +30,14 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
click_link
current_user
.
name
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录