Commit 4c0d9c4c authored by Fatih Acet's avatar Fatih Acet

Merge branch '2385-rebase-without-approvals' into 'master'

don't disable Rebase button for MR without Approvals

Closes #2385

See merge request !2031
parents c86db115 cba17c29
......@@ -19,11 +19,6 @@ export default {
isMakingRequest: false,
};
},
computed: {
isApprovalsLeft() {
return this.mr.approvals && this.mr.approvalsLeft;
},
},
methods: {
rebase() {
this.isMakingRequest = true;
......@@ -87,7 +82,7 @@ export default {
<div class="accept-merge-holder clearfix js-toggle-container accept-action">
<button
class="btn btn-small btn-reopen btn-success"
:disabled="isApprovalsLeft || isMakingRequest"
:disabled="isMakingRequest"
@click="rebase">
<i
v-if="isMakingRequest"
......@@ -101,12 +96,6 @@ export default {
branch into source branch to allow this merge request to be merged.
</span>
</div>
<div class="mr-info-list">
<div class="legend"></div>
<p v-if="isApprovalsLeft">
Rebasing is disabled until merge request has been approved.
</p>
</div>
</template>
</div>
</div>
......
---
title: fix Rebase being disabled for unapproved MRs
merge_request:
author:
......@@ -267,32 +267,6 @@ feature 'Merge request approvals', js: true, feature: true do
expect(page).to have_button('Merge when pipeline succeeds', disabled: true)
end
end
context 'when rebase is needed but no approval given', js: true do
let(:project) do
create(:project,
approvals_before_merge: 1,
merge_requests_rebase_enabled: true,
merge_requests_ff_only_enabled: true )
end
let(:merge_request) { create(:merge_request, source_project: project) }
before do
create :approver_group, group: group, target: merge_request
visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end
it 'I am unable to rebase the merge request' do
# before approval status is loaded
expect(page).to have_button("Rebase", disabled: true)
wait_for_requests
# after approval status is loaded
expect(page).to have_button("Rebase", disabled: true)
end
end
end
context 'when merge when discussions resolved is active', :js do
......
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