Commit aab713c1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Robert Speicher

Merge branch 'accept_mr_btn_ci_status' into 'master'

Merge button has color from CI status

This MR closes #3313

I'am not realy sure about the color for the skipped status (red)...

UI changes:

![accpet-mr-ci-failed](/uploads/c03970c468b89e38ed2c5e3171f53505/accpet-mr-ci-failed.png)

![accpet-mr-ci-skipped](/uploads/f29cbc69e77cc95b33522135b327cc51/accpet-mr-ci-skipped.png)

![accpet-mr-ci-pending](/uploads/79612a66fd497174e00bd348c9cba69c/accpet-mr-ci-pending.png)

![accpet-mr-ci-success](/uploads/4b601e6d02b860db5ff53c47c98f3206/accpet-mr-ci-success.png)

See merge request !1761
parent 8fab8377
......@@ -4,6 +4,7 @@ v 8.1.4
- Fix bug where manually merged branches in a MR would end up with an empty diff (Stan Hu)
- Prevent redirect loop when home_page_url is set to the root URL
- Fix incoming email config defaults
- Make color of "Accept Merge Request" button consistent with current build status
v 8.1.3
- Force update refs/merge-requests/X/head upon a push to the source branch of a merge request (Stan Hu)
......
......@@ -19,6 +19,20 @@
.accept-merge-holder {
.accept-action {
display: inline-block;
.accept_merge_request {
&.ci-pending,
&.ci-running {
@include btn-orange;
}
&.ci-skipped,
&.ci-failed,
&.ci-canceled,
&.ci-error {
@include btn-red;
}
}
}
.accept-control {
......
- status_class = @merge_request.ci_commit ? " ci-#{@merge_request.ci_commit.status}" : nil
= form_for [:merge, @project.namespace.becomes(Namespace), @project, @merge_request], remote: true, method: :post, html: { class: 'accept-mr-form js-requires-input' } do |f|
= hidden_field_tag :authenticity_token, form_authenticity_token
.accept-merge-holder.clearfix.js-toggle-container
.accept-action
= f.button class: "btn btn-create accept_merge_request" do
= f.button class: "btn btn-create accept_merge_request#{status_class}" do
Accept Merge Request
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
.accept-control.checkbox
......
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