Commit 18f80c55 authored by Douwe Maan's avatar Douwe Maan

Fix rendering of deleted blocking/blocked-on statuses.

parent bc2dd5e7
......@@ -276,11 +276,18 @@ module Gitlab
if raw_updates.has_key?("blockedOn")
blocked_ons = raw_updates["blockedOn"].map do |raw_blocked_on|
name, id = raw_blocked_on.split(":", 2)
deleted = name.start_with?("-")
name = name[1..-1] if deleted
text =
if name == project.import_source
"##{id}"
else
"#{project.namespace.path}/#{name}##{id}"
end
text = "~~#{text}~~" if deleted
text
end
updates << "*Blocked on: #{blocked_ons.join(", ")}*"
end
......@@ -288,11 +295,18 @@ module Gitlab
if raw_updates.has_key?("blocking")
blockings = raw_updates["blocking"].map do |raw_blocked_on|
name, id = raw_blocked_on.split(":", 2)
deleted = name.start_with?("-")
name = name[1..-1] if deleted
text =
if name == project.import_source
"##{id}"
else
"#{project.namespace.path}/#{name}##{id}"
end
text = "~~#{text}~~" if deleted
text
end
updates << "*Blocking: #{blockings.join(", ")}*"
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