BigW Consortium Gitlab

Unverified Commit 9dc774cd by Phil Hughes

Merge branch '10-4-stable-prepare-rc7' of gitlab.com:gitlab-org/gitlab-ce into…

Merge branch '10-4-stable-prepare-rc7' of gitlab.com:gitlab-org/gitlab-ce into 10-4-stable-prepare-rc7
parents f8799c08 ce872e01
......@@ -111,7 +111,7 @@ MergeRequest.prototype.initCommitMessageListeners = function() {
});
};
MergeRequest.setStatusBoxToMerged = function() {
MergeRequest.updateStatusText = function(classToRemove, classToAdd, newStatusText) {
$('.detail-page-header .status-box')
.removeClass('status-box-open')
.addClass('status-box-mr-merged')
......
......@@ -166,7 +166,7 @@ export default {
// If state is merged we should update the widget and stop the polling
eventHub.$emit('MRWidgetUpdateRequested');
eventHub.$emit('FetchActionsContent');
MergeRequest.setStatusBoxToMerged();
MergeRequest.updateStatusText('status-box-open', 'status-box-merged', 'Merged');
MergeRequest.hideCloseButton();
MergeRequest.decreaseCounter();
stopPolling();
......
---
title: Fix JavaScript bundle running on Cluster update/destroy pages
merge_request:
author:
type: fixed
---
title: Fix links to uploaded files on wiki pages
merge_request: 16499
author:
type: fixed
---
title: Fixed merge request status badge not updating after merging
merge_request:
author:
type: fixed
......@@ -9,6 +9,10 @@ module Banzai
end
def apply_rules
# Special case: relative URLs beginning with `/uploads/` refer to
# user-uploaded files and will be handled elsewhere.
return @uri.to_s if @uri.relative? && @uri.path.starts_with?('/uploads/')
apply_file_link_rules!
apply_hierarchical_link_rules!
apply_relative_link_rules!
......
......@@ -404,7 +404,7 @@ describe('MRWidgetReadyToMerge', () => {
setTimeout(() => {
const statusBox = document.querySelector('.status-box');
expect(statusBox.classList.contains('status-box-mr-merged')).toBeTruthy();
expect(statusBox.classList.contains('status-box-merged')).toBeTruthy();
expect(statusBox.textContent).toContain('Merged');
done();
......
......@@ -10,15 +10,23 @@ describe Banzai::Filter::WikiLinkFilter do
it "doesn't rewrite absolute links" do
filtered_link = filter("<a href='http://example.com:8000/'>Link</a>", project_wiki: wiki).children[0]
expect(filtered_link.attribute('href').value).to eq('http://example.com:8000/')
end
it "doesn't rewrite links to project uploads" do
filtered_link = filter("<a href='/uploads/a.test'>Link</a>", project_wiki: wiki).children[0]
expect(filtered_link.attribute('href').value).to eq('/uploads/a.test')
end
describe "invalid links" do
invalid_links = ["http://:8080", "http://", "http://:8080/path"]
invalid_links.each do |invalid_link|
it "doesn't rewrite invalid invalid_links like #{invalid_link}" do
filtered_link = filter("<a href='#{invalid_link}'>Link</a>", project_wiki: wiki).children[0]
expect(filtered_link.attribute('href').value).to eq(invalid_link)
end
end
......
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