Commit ead44226 authored by Fatih Acet's avatar Fatih Acet

Merge branch '24266-afraid-to-press-the-orange-button-on-merge-request-screen' into 'master'

If Build running change accept merge request when build succeeds button from orange to blue

## What does this MR do?

If Build running change accept merge request when build succeeds button from orange to blue

## Are there points in the code the reviewer needs to double check?

I didn't really check, but to my knowledge these changes should fix it. Would love to know how to set up working pipelines in my local build.

## Why was this MR needed?

orange was to big a warning color for this button


## Screenshots (if relevant)

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/c9100be272c5567ee4dfa281cffaeb7a/_24266_merge-request-01.png)
![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/bb84ea5b519fc67babf8383f3b396fb7/_24266_merge-request-02.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #24266

See merge request !7577
parents 85e6bb8f 11785719
......@@ -67,7 +67,7 @@
MergeRequestWidget.prototype.addEventListeners = function() {
var allowedPages;
allowedPages = ['show', 'commits', 'builds', 'pipelines', 'changes'];
return $(document).on('page:change.merge_request', (function(_this) {
$(document).on('page:change.merge_request', (function(_this) {
return function() {
var page;
page = $('body').data('page').split(':').last();
......@@ -245,7 +245,7 @@
case "not_found":
return this.setMergeButtonClass('btn-danger');
case "running":
return this.setMergeButtonClass('btn-warning');
return this.setMergeButtonClass('btn-info');
case "success":
case "success_with_warnings":
return this.setMergeButtonClass('btn-create');
......@@ -263,7 +263,7 @@
};
MergeRequestWidget.prototype.setMergeButtonClass = function(css_class) {
return $('.js-merge-button,.accept-action .dropdown-toggle').removeClass('btn-danger btn-warning btn-create').addClass(css_class);
return $('.js-merge-button,.accept-action .dropdown-toggle').removeClass('btn-danger btn-info btn-create').addClass(css_class);
};
return MergeRequestWidget;
......
......@@ -24,7 +24,7 @@
.accept_merge_request {
&.ci-pending,
&.ci-running {
@include btn-orange;
@include btn-blue;
}
&.ci-skipped,
......
......@@ -21,5 +21,5 @@
Remove Source Branch When Merged
- if user_can_cancel_automatic_merge
= link_to cancel_merge_when_build_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-warning btn-sm" do
= link_to cancel_merge_when_build_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-sm" do
Cancel Automatic Merge
---
title: If Build running change accept merge request when build succeeds button from orange to blue
merge_request: 7577
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment