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
433ca739
Commit
433ca739
authored
Apr 17, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some logic less twistable
parent
1c5b172a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
CHANGELOG
CHANGELOG
+1
-0
app/models/concerns/statuseable.rb
app/models/concerns/statuseable.rb
+1
-1
app/views/projects/builds/index.html.haml
app/views/projects/builds/index.html.haml
+1
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
.../generic_commit_statuses/_generic_commit_status.html.haml
+7
-6
spec/requests/api/commits_spec.rb
spec/requests/api/commits_spec.rb
+1
-1
No files found.
CHANGELOG
View file @
433ca739
...
@@ -52,6 +52,7 @@ v 8.7.0 (unreleased)
...
@@ -52,6 +52,7 @@ v 8.7.0 (unreleased)
- Hide `Create a group` help block when creating a new project in a group
- Hide `Create a group` help block when creating a new project in a group
- Implement 'TODOs View' as an option for dashboard preferences !3379 (Elias W.)
- Implement 'TODOs View' as an option for dashboard preferences !3379 (Elias W.)
- Allow issues and merge requests to be assigned to the author !2765
- Allow issues and merge requests to be assigned to the author !2765
- Make Ci::Commit to group only similar builds and make it stateful (ref, tag) (Kamil Trzciński)
- Gracefully handle notes on deleted commits in merge requests (Stan Hu)
- Gracefully handle notes on deleted commits in merge requests (Stan Hu)
- Decouple membership and notifications
- Decouple membership and notifications
- Fix creation of merge requests for orphaned branches (Stan Hu)
- Fix creation of merge requests for orphaned branches (Stan Hu)
...
...
app/models/concerns/statuseable.rb
View file @
433ca739
...
@@ -7,7 +7,7 @@ module Statuseable
...
@@ -7,7 +7,7 @@ module Statuseable
def
status_sql
def
status_sql
builds
=
all
.
select
(
'count(*)'
).
to_sql
builds
=
all
.
select
(
'count(*)'
).
to_sql
success
=
all
.
success
.
select
(
'count(*)'
).
to_sql
success
=
all
.
success
.
select
(
'count(*)'
).
to_sql
ignored
=
all
.
ignored
.
select
(
'count(*)'
).
to_sql
if
all
.
try
(
:ignored
)
ignored
=
all
.
ignored
.
select
(
'count(*)'
).
to_sql
if
all
.
respond_to?
(
:ignored
)
ignored
||=
'0'
ignored
||=
'0'
pending
=
all
.
pending
.
select
(
'count(*)'
).
to_sql
pending
=
all
.
pending
.
select
(
'count(*)'
).
to_sql
running
=
all
.
running
.
select
(
'count(*)'
).
to_sql
running
=
all
.
running
.
select
(
'count(*)'
).
to_sql
...
...
app/views/projects/builds/index.html.haml
View file @
433ca739
...
@@ -58,6 +58,6 @@
...
@@ -58,6 +58,6 @@
%th
Coverage
%th
Coverage
%th
%th
=
render
@builds
,
commit_sha:
true
,
stage:
true
,
allow_retry:
true
,
coverage:
@project
.
build_coverage_enabled?
=
render
@builds
,
commit_sha:
true
,
ref:
true
,
stage:
true
,
allow_retry:
true
,
coverage:
@project
.
build_coverage_enabled?
=
paginate
@builds
,
theme:
'gitlab'
=
paginate
@builds
,
theme:
'gitlab'
app/views/projects/ci/builds/_build.html.haml
View file @
433ca739
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
%td
%td
=
link_to
build
.
short_sha
,
namespace_project_commit_path
(
build
.
project
.
namespace
,
build
.
project
,
build
.
sha
),
class:
"monospace"
=
link_to
build
.
short_sha
,
namespace_project_commit_path
(
build
.
project
.
namespace
,
build
.
project
,
build
.
sha
),
class:
"monospace"
-
if
!
defined?
(
ref
)
||
ref
-
if
defined?
(
ref
)
&&
ref
%td
%td
-
if
build
.
ref
-
if
build
.
ref
=
link_to
build
.
ref
,
namespace_project_commits_path
(
build
.
project
.
namespace
,
build
.
project
,
build
.
ref
)
=
link_to
build
.
ref
,
namespace_project_commits_path
(
build
.
project
.
namespace
,
build
.
project
,
build
.
ref
)
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
View file @
433ca739
...
@@ -15,12 +15,13 @@
...
@@ -15,12 +15,13 @@
-
if
defined?
(
commit_sha
)
&&
commit_sha
-
if
defined?
(
commit_sha
)
&&
commit_sha
%td
%td
=
link_to
generic_commit_status
.
short_sha
,
namespace_project_commit_path
(
generic_commit_status
.
project
.
namespace
,
generic_commit_status
.
project
,
generic_commit_status
.
sha
),
class:
"monospace"
=
link_to
generic_commit_status
.
short_sha
,
namespace_project_commit_path
(
generic_commit_status
.
project
.
namespace
,
generic_commit_status
.
project
,
generic_commit_status
.
sha
),
class:
"monospace"
%td
-
if
defined?
(
ref
)
&&
ref
-
if
generic_commit_status
.
ref
%td
=
link_to
generic_commit_status
.
ref
,
namespace_project_commits_path
(
generic_commit_status
.
project
.
namespace
,
generic_commit_status
.
project
,
generic_commit_status
.
ref
)
-
if
generic_commit_status
.
ref
-
else
=
link_to
generic_commit_status
.
ref
,
namespace_project_commits_path
(
generic_commit_status
.
project
.
namespace
,
generic_commit_status
.
project
,
generic_commit_status
.
ref
)
.light
none
-
else
.light
none
-
if
defined?
(
runner
)
&&
runner
-
if
defined?
(
runner
)
&&
runner
%td
%td
...
...
spec/requests/api/commits_spec.rb
View file @
433ca739
...
@@ -48,7 +48,7 @@ describe API::API, api: true do
...
@@ -48,7 +48,7 @@ describe API::API, api: true do
expect
(
response
.
status
).
to
eq
(
404
)
expect
(
response
.
status
).
to
eq
(
404
)
end
end
it
"should return n
ot_found for CI status
"
do
it
"should return n
il for commit without CI
"
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
repository
.
commit
.
id
}
"
,
user
)
get
api
(
"/projects/
#{
project
.
id
}
/repository/commits/
#{
project
.
repository
.
commit
.
id
}
"
,
user
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
'status'
]).
to
be_nil
expect
(
json_response
[
'status'
]).
to
be_nil
...
...
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