aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoo-data.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 79c3b34..37b606f 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -208,25 +208,35 @@ class GentooPlugin < Plugin
break
end }
- emails = []
if project
+ emails = []
for maintainer in project.get_elements("member")
emails << maintainer.get_elements('email')[0].text.chomp('@gentoo.org')
end
for subproject in project.get_elements("subproject")
if subproject.attributes["inherit-members"] == "1"
- emails += expand_project_recursively(projects,
+ sub_emails = expand_project_recursively(projects,
subproject.attributes["ref"])
+ if sub_emails.nil?
+ emails << "<#{subproject.attributes["ref"]}>"
+ else
+ emails += sub_emails
+ end
end
end
+ return emails
+ else
+ return nil
end
- return emails
end
emails = expand_project_recursively(projects, req_project)
- unless emails.empty?
- m.reply "(#{req_project}) #{emails.sort.uniq.join(', ')}"
- else
+
+ if emails.nil?
m.reply "No such project: #{req_project}"
+ elsif emails.empty?
+ m.reply "(#{req_project}) [no members]"
+ else
+ m.reply "(#{req_project}) #{emails.sort.uniq.join(', ')}"
end
end