mod_hgpoll.py

changeset 87
9e757b602586
parent 82
c6e853703ca8
child 110
b2770c43b752
--- a/mod_hgpoll.py	Sat Nov 15 16:50:47 2014 +0200
+++ b/mod_hgpoll.py	Mon Nov 17 22:14:58 2014 +0200
@@ -25,7 +25,13 @@
 			'description': 'Executes a hg command',
 			'args': '<repo> <command...>',
 			'level': 'admin',
-		}
+		},
+		{
+			'name': 'resolves',
+			'description': 'Manually cause a ticket to be resolved by a changeset',
+			'args': '<ticket> <changeset>',
+			'level': 'admin',
+		},
 	]
 }
 
@@ -149,4 +155,10 @@
 		if result[0]:
 			self.privmsg (replyto, 'error: %s' % result[1])
 		else:
-			self.privmsg (replyto, 'error: %s' % `e`)
\ No newline at end of file
+			self.privmsg (replyto, 'error: %s' % `e`)
+
+def cmd_resolves (bot, args, replyto, **rest):
+	try:
+		HgPoll.announce_ticket_resolved (args['ticket'], args['changeset'])
+	except Exception as e:
+		bot.privmsg (replyto, 'Error: %s' % e)

mercurial