[50330] trunk/base/portmgr/bots/trac.rb

anddam at macports.org anddam at macports.org
Wed Apr 29 01:21:58 PDT 2009


Revision: 50330
          http://trac.macports.org/changeset/50330
Author:   anddam at macports.org
Date:     2009-04-29 01:21:56 -0700 (Wed, 29 Apr 2009)
Log Message:
-----------
More little steps for mpbot.

Modified Paths:
--------------
    trunk/base/portmgr/bots/trac.rb

Modified: trunk/base/portmgr/bots/trac.rb
===================================================================
--- trunk/base/portmgr/bots/trac.rb	2009-04-29 07:32:13 UTC (rev 50329)
+++ trunk/base/portmgr/bots/trac.rb	2009-04-29 08:21:56 UTC (rev 50330)
@@ -17,8 +17,12 @@
 		case topic
 		  when "ticket"
 			return "ticket <ticket no.> => show http link for ticket # <ticket no.>"
+		  when "faq"
+			return "faq [help] => show FAQs' URL or help"
+		  when "guide"
+			return "guide [help] => show The Guide's URL or help. Don't Panic."		 
 		  else
-			return "trac commands: ticket"
+			return "trac module provides: !ticket, !faq, !guide"
 		end
 	end
 
@@ -31,8 +35,28 @@
 			m.reply "Use either #1234 or 1234 for ticket number"
 		end
 	end
+
+	def faq(m, params)
+		if ( params[:parm] )
+			m.reply "Just type !faq for now"
+		else
+			m.reply "FAQs are at: http://trac.macports.org/wiki/FAQ"
+		end
+	end
+
+	def guide(m, params)
+		if ( params[:parm] == "chunked" )
+			m.reply "http://guide.macports.org/chunked/index.html"
+		elsif ( params[:parm] != "" )
+			m.reply "Just type !faq for now"
+		else
+			m.reply "FAQs are at: http://trac.macports.org/wiki/FAQ"
+		end
+	end
 	
 end
 
 plugin = TracPlugin.new
 plugin.map 'ticket :number', :action => 'ticket'
+plugin.map 'faq :parm', :action => 'faq'
+plugin.map 'guide :parm', :action => 'guide'
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090429/11e9dfd4/attachment.html>


More information about the macports-changes mailing list