@@ -0,0 +1,1534 @@
+# -*- coding: utf8 -*-%0A%22%22%22%0ACopyright 2014 Ryan Brown %3Csb@ryansb.com%3E%0A%0AThis file is part of taskforge.%0A%0Ataskforge is free software: you can redistribute it and/or modify%0Ait under the terms of the GNU Affero General Public License as%0Apublished by the Free Software Foundation, either version 3 of%0Athe License, or (at your option) any later version.%0A%0Ataskforge is distributed in the hope that it will be useful,%0Abut WITHOUT ANY WARRANTY; without even the implied warranty of%0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0AGNU Affero General Public License for more details.%0A%0AYou should have received a copy of the GNU Affero General Public License%0Aalong with taskforge.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A%22%22%22%0A%0Aimport re%0A%0Aimport requests%0A%0Afrom taskforge.plugin import PluginBase%0A%0A%22%22%22Adapted from https;//gist.github.com/uogbuji/705383%22%22%22%0A_URL_REGEX = re.compile(%0A    ur'(?i)%5Cb((?:https?://)(?:%5B%5E%5Cs()%3C%3E%5D+%7C%5C((%5B%5E%5Cs()%3C%3E%5D+%7C(%5C(%5B%5E%5Cs()%3C%3E%5D+%5C)))*%5C))+'%0A    ur'(?:%5C((%5B%5E%5Cs()%3C%3E%5D+%7C(%5C(%5B%5E%5Cs()%3C%3E%5D+%5C)))*%5C)%7C%5B%5E%5Cs%60!()%5C%5B%5C%5D%7B%7D;:%5C'%22.,%3C%3E?'%0A    ur'%5Cxab%5Cxbb%5Cu201c%5Cu201d%5Cu2018%5Cu2019%5D))')%0A%0A%0Aclass Bugwarrior(PluginBase):%0A    def __init__(self, **kwargs):%0A        super(Bugwarrior, self).__init__(**kwargs)%0A%0A    def pre_run(self):%0A        from subprocess import call%0A        ret = call(%5B%22bugwarrior-pull%22%5D)%0A        if ret == 0:%0A            print %22Bugwarrior run successfully.%22%0A        else:%0A            print %22Bugwarrior failed with exit code %7B%7D%22.format(ret)%0A%0A    def post_run(self):%0A        pass%0A%0A    def process_task(self, task):%0A        pass%0A

add bugwarrior plugin