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
Tatuya Kamada
gitlab-ce
Commits
9a82aa70
Commit
9a82aa70
authored
Nov 25, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove builds tab from commit
Remove unused file Fix commit link
parent
dfa842ce
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6 additions
and
61 deletions
+6
-61
app/assets/javascripts/dispatcher.js.es6
app/assets/javascripts/dispatcher.js.es6
+0
-1
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+2
-29
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-11
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-1
app/views/projects/_last_commit.html.haml
app/views/projects/_last_commit.html.haml
+2
-1
app/views/projects/builds/_header.html.haml
app/views/projects/builds/_header.html.haml
+1
-1
app/views/projects/commit/_builds.html.haml
app/views/projects/commit/_builds.html.haml
+0
-2
app/views/projects/commit/_ci_menu.html.haml
app/views/projects/commit/_ci_menu.html.haml
+0
-4
app/views/projects/commit/builds.html.haml
app/views/projects/commit/builds.html.haml
+0
-9
app/views/projects/merge_requests/show/_builds.html.haml
app/views/projects/merge_requests/show/_builds.html.haml
+0
-1
config/routes/project.rb
config/routes/project.rb
+0
-1
No files found.
app/assets/javascripts/dispatcher.js.es6
View file @
9a82aa70
...
@@ -138,7 +138,6 @@
...
@@ -138,7 +138,6 @@
new MergedButtons();
new MergedButtons();
break;
break;
case 'projects:merge_requests:commits':
case 'projects:merge_requests:commits':
case 'projects:merge_requests:builds':
new MergedButtons();
new MergedButtons();
break;
break;
case 'projects:merge_requests:pipelines':
case 'projects:merge_requests:pipelines':
...
...
app/controllers/projects/commit_controller.rb
View file @
9a82aa70
...
@@ -8,13 +8,10 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -8,13 +8,10 @@ class Projects::CommitController < Projects::ApplicationController
# Authorize
# Authorize
before_action
:require_non_empty_project
before_action
:require_non_empty_project
before_action
:authorize_download_code!
,
except:
[
:cancel_builds
,
:retry_builds
]
before_action
:authorize_update_build!
,
only:
[
:cancel_builds
,
:retry_builds
]
before_action
:authorize_read_pipeline!
,
only:
[
:pipelines
]
before_action
:authorize_read_pipeline!
,
only:
[
:pipelines
]
before_action
:authorize_read_commit_status!
,
only:
[
:builds
]
before_action
:commit
before_action
:commit
before_action
:define_commit_vars
,
only:
[
:show
,
:diff_for_path
,
:
builds
,
:
pipelines
]
before_action
:define_commit_vars
,
only:
[
:show
,
:diff_for_path
,
:pipelines
]
before_action
:define_status_vars
,
only:
[
:show
,
:
builds
,
:
pipelines
]
before_action
:define_status_vars
,
only:
[
:show
,
:pipelines
]
before_action
:define_note_vars
,
only:
[
:show
,
:diff_for_path
]
before_action
:define_note_vars
,
only:
[
:show
,
:diff_for_path
]
before_action
:authorize_edit_tree!
,
only:
[
:revert
,
:cherry_pick
]
before_action
:authorize_edit_tree!
,
only:
[
:revert
,
:cherry_pick
]
...
@@ -35,25 +32,6 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -35,25 +32,6 @@ class Projects::CommitController < Projects::ApplicationController
def
pipelines
def
pipelines
end
end
def
builds
end
def
cancel_builds
ci_builds
.
running_or_pending
.
each
(
&
:cancel
)
redirect_back_or_default
default:
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
sha
)
end
def
retry_builds
ci_builds
.
latest
.
failed
.
each
do
|
build
|
if
build
.
retryable?
Ci
::
Build
.
retry
(
build
,
current_user
)
end
end
redirect_back_or_default
default:
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
sha
)
end
def
branches
def
branches
@branches
=
@project
.
repository
.
branch_names_contains
(
commit
.
id
)
@branches
=
@project
.
repository
.
branch_names_contains
(
commit
.
id
)
@tags
=
@project
.
repository
.
tag_names_contains
(
commit
.
id
)
@tags
=
@project
.
repository
.
tag_names_contains
(
commit
.
id
)
...
@@ -98,10 +76,6 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -98,10 +76,6 @@ class Projects::CommitController < Projects::ApplicationController
@noteable
=
@commit
||=
@project
.
commit
(
params
[
:id
])
@noteable
=
@commit
||=
@project
.
commit
(
params
[
:id
])
end
end
def
ci_builds
@ci_builds
||=
Ci
::
Build
.
where
(
pipeline:
pipelines
)
end
def
define_commit_vars
def
define_commit_vars
return
git_not_found!
unless
commit
return
git_not_found!
unless
commit
...
@@ -134,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -134,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController
def
define_status_vars
def
define_status_vars
@ci_pipelines
=
project
.
pipelines
.
where
(
sha:
commit
.
sha
)
@ci_pipelines
=
project
.
pipelines
.
where
(
sha:
commit
.
sha
)
@statuses
=
CommitStatus
.
where
(
pipeline:
@ci_pipelines
).
relevant
@statuses
=
CommitStatus
.
where
(
pipeline:
@ci_pipelines
).
relevant
@builds
=
Ci
::
Build
.
where
(
pipeline:
@ci_pipelines
).
relevant
end
end
def
assign_change_commit_vars
(
mr_source_branch
)
def
assign_change_commit_vars
(
mr_source_branch
)
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
9a82aa70
...
@@ -201,17 +201,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -201,17 +201,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
end
end
def
builds
respond_to
do
|
format
|
format
.
html
do
define_discussion_vars
render
'show'
end
format
.
json
{
render
json:
{
html:
view_to_html_string
(
'projects/merge_requests/show/_builds'
)
}
}
end
end
def
pipelines
def
pipelines
@pipelines
=
@merge_request
.
all_pipelines
@pipelines
=
@merge_request
.
all_pipelines
...
...
app/helpers/ci_status_helper.rb
View file @
9a82aa70
module
CiStatusHelper
module
CiStatusHelper
def
ci_status_path
(
pipeline
)
def
ci_status_path
(
pipeline
)
project
=
pipeline
.
project
project
=
pipeline
.
project
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
pipeline
.
sha
)
#
builds_namespace_project_commit_path(project.namespace, project, pipeline.sha)
end
end
# Is used by Commit and Merge Request Widget
# Is used by Commit and Merge Request Widget
...
...
app/views/projects/_last_commit.html.haml
View file @
9a82aa70
-
ref
=
local_assigns
.
fetch
(
:ref
)
-
ref
=
local_assigns
.
fetch
(
:ref
)
-
status
=
commit
.
status
(
ref
)
-
status
=
commit
.
status
(
ref
)
-
if
status
-
if
status
=
link_to
build
s_namespace_project_commit_path
(
commit
.
project
.
namespace
,
commit
.
project
,
commit
),
class:
"ci-status ci-
#{
status
}
"
do
=
link_to
pipeline
s_namespace_project_commit_path
(
commit
.
project
.
namespace
,
commit
.
project
,
commit
),
class:
"ci-status ci-
#{
status
}
"
do
=
ci_icon_for_status
(
status
)
=
ci_icon_for_status
(
status
)
=
ci_label_for_status
(
status
)
=
ci_label_for_status
(
status
)
...
...
app/views/projects/builds/_header.html.haml
View file @
9a82aa70
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
=
link_to
pipeline_path
(
@build
.
pipeline
)
do
=
link_to
pipeline_path
(
@build
.
pipeline
)
do
%strong
##{@build.pipeline.id}
%strong
##{@build.pipeline.id}
for commit
for commit
=
link_to
ci_status_path
(
@build
.
pipeline
)
do
=
link_to
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@build
.
pipeline
.
sha
)
do
%strong
=
@build
.
pipeline
.
short_sha
%strong
=
@build
.
pipeline
.
short_sha
from
from
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@build
.
ref
)
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@build
.
ref
)
do
...
...
app/views/projects/commit/_builds.html.haml
deleted
100644 → 0
View file @
dfa842ce
-
@ci_pipelines
.
each
do
|
pipeline
|
=
render
"pipeline"
,
pipeline:
pipeline
,
pipeline_details:
true
app/views/projects/commit/_ci_menu.html.haml
View file @
9a82aa70
...
@@ -8,7 +8,3 @@
...
@@ -8,7 +8,3 @@
=
link_to
pipelines_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
do
=
link_to
pipelines_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
do
Pipelines
Pipelines
%span
.badge
=
@ci_pipelines
.
count
%span
.badge
=
@ci_pipelines
.
count
=
nav_link
(
path:
'commit#builds'
)
do
=
link_to
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
)
do
Builds
%span
.badge
=
@statuses
.
count
app/views/projects/commit/builds.html.haml
deleted
100644 → 0
View file @
dfa842ce
-
@no_container
=
true
-
page_title
"Builds"
,
"
#{
@commit
.
title
}
(
#{
@commit
.
short_id
}
)"
,
"Commits"
=
render
"projects/commits/head"
%div
{
class:
container_class
}
=
render
"commit_box"
=
render
"ci_menu"
=
render
"builds"
app/views/projects/merge_requests/show/_builds.html.haml
deleted
100644 → 0
View file @
dfa842ce
=
render
"projects/commit/pipeline"
,
pipeline:
@pipeline
,
link_to_commit:
true
config/routes/project.rb
View file @
9a82aa70
...
@@ -32,7 +32,6 @@ constraints(ProjectUrlConstrainer.new) do
...
@@ -32,7 +32,6 @@ constraints(ProjectUrlConstrainer.new) do
resources
:commit
,
only:
[
:show
],
constraints:
{
id:
/\h{7,40}/
}
do
resources
:commit
,
only:
[
:show
],
constraints:
{
id:
/\h{7,40}/
}
do
member
do
member
do
get
:branches
get
:branches
get
:builds
get
:pipelines
get
:pipelines
post
:cancel_builds
post
:cancel_builds
post
:retry_builds
post
:retry_builds
...
...
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