mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 02:26:12 +10:00
Merge branch 'return-rebase-checkbox' into 'master'
Return rebase checkbox Should be backported to 7.12 Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/1816 See merge request !425
This commit is contained in:
+37
-25
@@ -1,3 +1,4 @@
|
||||
# This file is generated by GitLab CI
|
||||
before_script:
|
||||
- export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
|
||||
- ruby -v
|
||||
@@ -7,33 +8,44 @@ before_script:
|
||||
- echo $PATH
|
||||
- cp config/database.yml.mysql config/database.yml
|
||||
- cp config/gitlab.yml.example config/gitlab.yml
|
||||
- ! 'sed "s/username\:.*$/username\: runner/" -i config/database.yml'
|
||||
- ! 'sed "s/password\:.*$/password\: ''password''/" -i config/database.yml'
|
||||
- 'sed "s/username\:.*$/username\: runner/" -i config/database.yml'
|
||||
- 'sed "s/password\:.*$/password\: ''password''/" -i config/database.yml'
|
||||
- sed "s/gitlabhq_test/gitlabhq_test_$((RANDOM/5000))/" -i config/database.yml
|
||||
- touch log/application.log
|
||||
- touch log/test.log
|
||||
- bundle install --without postgres production --jobs $(nproc)
|
||||
- bundle exec rake db:create RAILS_ENV=test
|
||||
jobs:
|
||||
- script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec
|
||||
name: Rspec
|
||||
runner: ruby,mysql
|
||||
- script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach
|
||||
name: Spinach
|
||||
runner: ruby,mysql
|
||||
- script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake jasmine:ci
|
||||
name: Jasmine
|
||||
runner: ruby,mysql
|
||||
- script:
|
||||
- bundle exec rubocop
|
||||
name: Rubocop
|
||||
runner: ruby,mysql
|
||||
- script:
|
||||
- bundle exec rake brakeman
|
||||
name: Brakeman
|
||||
runner: ruby,mysql
|
||||
deploy_jobs: []
|
||||
skip_refs: ''
|
||||
Rspec:
|
||||
script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec
|
||||
tags:
|
||||
- ruby
|
||||
- mysql
|
||||
|
||||
Spinach:
|
||||
script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach
|
||||
tags:
|
||||
- ruby
|
||||
- mysql
|
||||
|
||||
Jasmine:
|
||||
script:
|
||||
- RAILS_ENV=test SIMPLECOV=true bundle exec rake jasmine:ci
|
||||
tags:
|
||||
- ruby
|
||||
- mysql
|
||||
|
||||
Rubocop:
|
||||
script:
|
||||
- bundle exec rubocop
|
||||
tags:
|
||||
- ruby
|
||||
- mysql
|
||||
|
||||
Brakeman:
|
||||
script:
|
||||
- bundle exec rake brakeman
|
||||
tags:
|
||||
- ruby
|
||||
- mysql
|
||||
@@ -9,6 +9,12 @@
|
||||
= label_tag :should_remove_source_branch, class: "remove_source_checkbox" do
|
||||
= check_box_tag :should_remove_source_branch
|
||||
Remove source-branch
|
||||
- if @merge_request.target_project.merge_requests_rebase_enabled && can_rebase?(@merge_request.target_project, @merge_request.target_branch)
|
||||
.accept-control.remove_branch_holder.checkbox
|
||||
= label_tag :should_rebase do
|
||||
= check_box_tag :should_rebase, "1", @project.merge_requests_rebase_default
|
||||
%strong Rebase before merge
|
||||
|
||||
.accept-control
|
||||
= link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
|
||||
%i.fa.fa-edit
|
||||
|
||||
@@ -227,3 +227,11 @@ Feature: Project Merge Requests
|
||||
And I should not see merge button
|
||||
When I click link "Approve"
|
||||
Then I should see approved merge request "Bug NS-04"
|
||||
|
||||
Scenario: I should see rebase checkbox
|
||||
Given project "Shop" have "Bug NS-05" open merge request with diffs inside
|
||||
And rebase before merge enabled
|
||||
And merge request "Bug NS-05" is mergeable
|
||||
And I visit merge request page "Bug NS-05"
|
||||
And merge request is mergeable
|
||||
Then I should see rebase checkbox
|
||||
|
||||
@@ -356,6 +356,16 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
|
||||
end
|
||||
end
|
||||
|
||||
step 'rebase before merge enabled' do
|
||||
project = merge_request.target_project
|
||||
project.merge_requests_rebase_enabled = true
|
||||
project.save!
|
||||
end
|
||||
|
||||
step 'I should see rebase checkbox' do
|
||||
expect(page).to have_content 'Rebase before merge'
|
||||
end
|
||||
|
||||
def merge_request
|
||||
@merge_request ||= MergeRequest.find_by!(title: "Bug NS-05")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user