summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/pages/issuable.scss51
-rw-r--r--app/services/merge_requests/merge_when_build_succeeds_service.rb12
-rw-r--r--app/views/layouts/_head.html.haml1
3 files changed, 33 insertions, 31 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index ef62f069dc2..374c66ef5af 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -64,7 +64,6 @@
// This prevents the mess when resizing the sidebar
// of elements repositioning themselves..
width: $gutter_inner_width;
- overflow-x: hidden;
// --
&:first-child {
@@ -90,7 +89,6 @@
.gutter-toggle {
margin-left: 20px;
- border-left: 1px solid $border-gray-light;
padding-left: 10px;
&:hover {
@@ -157,11 +155,10 @@
.right-sidebar {
position: fixed;
top: 58px;
+ bottom: 0;
right: 0;
- height: 100%;
- transition-duration: .3s;
+ transition: width .3s;
background: $gray-light;
- overflow: scroll;
padding: 10px 20px;
&.right-sidebar-expanded {
@@ -170,6 +167,14 @@
hr {
display: none;
}
+
+ .sidebar-collapsed-icon {
+ display: none;
+ }
+
+ .gutter-toggle {
+ border-left: 1px solid $border-gray-light;
+ }
}
.subscribe-button {
@@ -181,7 +186,6 @@
&.right-sidebar-collapsed {
width: $sidebar_collapsed_width;
padding-top: 0;
- overflow-x: hidden;
hr {
margin: 0;
@@ -192,21 +196,13 @@
}
.block {
- border-bottom: none;
+ width: $sidebar_collapsed_width - 1px;
+ margin-left: -19px;
padding: 15px 0 0 0;
+ border-bottom: none;
+ overflow: hidden;
}
- }
-
- .btn {
- background: $gray-normal;
- border: 1px solid $border-gray-normal;
- &:hover {
- background: $gray-dark;
- border: 1px solid $border-gray-dark;
- }
- }
- &.right-sidebar-collapsed {
.issuable-count,
.issuable-nav,
.assignee > *,
@@ -219,15 +215,13 @@
}
.gutter-toggle {
- margin-left: -$gutter_inner_width + 4;
+ margin-left: -36px;
}
.sidebar-collapsed-icon {
display: block;
- float: left;
- width: 62px;
+ width: 100%;
text-align: center;
- margin-left: -19px;
padding-bottom: 10px;
color: #999999;
@@ -247,14 +241,15 @@
color: #999999;
}
}
-
}
-
}
- &.right-sidebar-expanded {
- .sidebar-collapsed-icon {
- display: none;
+ .btn {
+ background: $gray-normal;
+ border: 1px solid $border-gray-normal;
+ &:hover {
+ background: $gray-dark;
+ border: 1px solid $border-gray-dark;
}
}
}
@@ -263,4 +258,4 @@
small {
color: $gray-darkest;
}
-} \ No newline at end of file
+}
diff --git a/app/services/merge_requests/merge_when_build_succeeds_service.rb b/app/services/merge_requests/merge_when_build_succeeds_service.rb
index 531bbc9b067..d6af12f9739 100644
--- a/app/services/merge_requests/merge_when_build_succeeds_service.rb
+++ b/app/services/merge_requests/merge_when_build_succeeds_service.rb
@@ -24,10 +24,14 @@ module MergeRequests
merge_requests.each do |merge_request|
next unless merge_request.merge_when_build_succeeds?
+ next unless merge_request.mergeable?
- if merge_request.ci_commit && merge_request.ci_commit.success? && merge_request.mergeable?
- MergeWorker.perform_async(merge_request.id, merge_request.merge_user_id, merge_request.merge_params)
- end
+ ci_commit = merge_request.ci_commit
+ next unless ci_commit
+ next unless ci_commit.sha == commit_status.sha
+ next unless ci_commit.success?
+
+ MergeWorker.perform_async(merge_request.id, merge_request.merge_user_id, merge_request.merge_params)
end
end
@@ -51,6 +55,8 @@ module MergeRequests
# This is for ref-less builds
branches ||= @project.repository.branch_names_contains(commit_status.sha)
+ return [] if branches.blank?
+
merge_requests = @project.origin_merge_requests.opened.where(source_branch: branches).to_a
merge_requests += @project.fork_merge_requests.opened.where(source_branch: branches).to_a
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 38ca4f91c4d..79cdbac1f37 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -44,6 +44,7 @@
= favicon_link_tag 'touch-icon-ipad.png', rel: 'apple-touch-icon', sizes: '76x76'
= favicon_link_tag 'touch-icon-iphone-retina.png', rel: 'apple-touch-icon', sizes: '120x120'
= favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152'
+ %link{rel: 'mask-icon', href: image_path('logo.svg'), color: 'rgb(226, 67, 41)'}
-# Windows 8 pinned site tile
%meta{name: 'msapplication-TileImage', content: image_path('msapplication-tile.png')}