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
Léo-Paul Géneau
gitlab-ce
Commits
865e8853
Commit
865e8853
authored
May 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs for MySQL
parent
8c93b605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
app/models/ci/commit.rb
app/models/ci/commit.rb
+2
-3
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+1
-1
No files found.
app/models/ci/commit.rb
View file @
865e8853
...
@@ -8,8 +8,6 @@ module Ci
...
@@ -8,8 +8,6 @@ module Ci
has_many
:builds
,
class_name:
'Ci::Build'
has_many
:builds
,
class_name:
'Ci::Build'
has_many
:trigger_requests
,
dependent: :destroy
,
class_name:
'Ci::TriggerRequest'
has_many
:trigger_requests
,
dependent: :destroy
,
class_name:
'Ci::TriggerRequest'
delegate
:stages
,
to: :statuses
validates_presence_of
:sha
validates_presence_of
:sha
validates_presence_of
:status
validates_presence_of
:status
validate
:valid_commit_sha
validate
:valid_commit_sha
...
@@ -22,7 +20,8 @@ module Ci
...
@@ -22,7 +20,8 @@ module Ci
end
end
def
self
.
stages
def
self
.
stages
CommitStatus
.
where
(
commit:
all
).
stages
# We use pluck here due to problems with MySQL which doesn't allow LIMIT/OFFSET in queries
CommitStatus
.
where
(
commit:
pluck
(
:id
)).
stages
end
end
def
project_id
def
project_id
...
...
app/views/projects/pipelines/index.html.haml
View file @
865e8853
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
%tbody
%tbody
%th
ID
%th
ID
%th
Commit
%th
Commit
-
@pipelines
.
stages
.
each
do
|
stage
|
-
stages
.
each
do
|
stage
|
%th
%th
%span
.has-tooltip
(
title=
"#{stage.titleize}"
)
%span
.has-tooltip
(
title=
"#{stage.titleize}"
)
=
truncate
(
stage
.
titleize
.
pluralize
,
length:
8
)
=
truncate
(
stage
.
titleize
.
pluralize
,
length:
8
)
...
...
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