diff options
Diffstat (limited to 'nsa')
-rwxr-xr-x | nsa | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -426,7 +426,10 @@ while (1) do (header, content) = line.split(':', 2); content.strip! if header.upcase == "SUBJECT" - project = /Announce\s+([A-Za-z0-9_-]+)/.match(content)[1]; + m = /Announce\s+([A-Za-z0-9_-]+)/.match(content) + if m + project = m[1]; + end end elsif (not in_headers) lines.push line @@ -436,6 +439,11 @@ while (1) do fh.close File.unlink(filename) + if project.nil? + puts "Ignoring invalid mail without project" + next + end + puts "Project "+project puts "commitmsg "+commitmsg |