summaryrefslogtreecommitdiff
path: root/lib/gitlab/google_code_import
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-03 16:21:32 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-03 16:21:32 +0200
commitc590cd3443887c1d625ee2310ff5a3da7a0faee3 (patch)
tree96f18480f2dd81698152cd1150e11c428d7047ae /lib/gitlab/google_code_import
parent17e23108788b4407dba4480f7b2e96013e023b32 (diff)
downloadgitlab-ce-c590cd3443887c1d625ee2310ff5a3da7a0faee3.tar.gz
Mask owner email when updated.
Diffstat (limited to 'lib/gitlab/google_code_import')
-rw-r--r--lib/gitlab/google_code_import/importer.rb24
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb
index da0f9a10b03..84ad1516571 100644
--- a/lib/gitlab/google_code_import/importer.rb
+++ b/lib/gitlab/google_code_import/importer.rb
@@ -169,13 +169,9 @@ module Gitlab
"#428bca"
when "Status: Accepted"
"#5cb85c"
- when "Status: NeedInfo"
- "#f0ad4e"
when "Status: Started"
"#8e44ad"
- when "Status: Wishlist"
- "#a8d695"
- #
+
when "Priority: Critical"
"#ffcfcf"
when "Priority: High"
@@ -184,17 +180,17 @@ module Gitlab
"#fff5cc"
when "Priority: Low"
"#cfe9ff"
- #
+
when "Type: Defect"
"#d9534f"
when "Type: Enhancement"
"#44ad8e"
- when "Type: Other"
- "#7f8c8d"
- when "Type: Review"
- "#8e44ad"
when "Type: Task"
"#4b6dd0"
+ when "Type: Review"
+ "#8e44ad"
+ when "Type: Other"
+ "#7f8c8d"
else
"#e2e2e2"
end
@@ -253,6 +249,10 @@ module Gitlab
updates << "*Status: #{raw_updates["status"]}*"
end
+ if raw_updates.has_key?("owner")
+ updates << "*Owner: #{mask_email(raw_updates["owner"])}*"
+ end
+
if raw_updates.has_key?("cc")
cc = raw_updates["cc"].map do |l|
deleted = l.start_with?("-")
@@ -277,10 +277,6 @@ module Gitlab
updates << "*Labels: #{labels.join(", ")}*"
end
- if raw_updates.has_key?("owner")
- updates << "*Owner: #{raw_updates["owner"]}*"
- end
-
if raw_updates.has_key?("mergedInto")
updates << "*Merged into: ##{raw_updates["mergedInto"]}*"
end