def keyword_k(self, params=None, **kwargs): """Retrieve kernel.org Bugzilla bug information (ex: K12345)""" if params: params = utils.ensure_int(params) if not params: return query = urllib.urlencode({"id": params}) url = "http://bugzilla.kernel.org/show_bug.cgi?%s" % query response = self.irc.fetch_url(url, self.name) if not response or not isinstance(params, int): return soup = BeautifulSoup(response.read()) desc = utils.decode_entities(soup.head.title.string) try: status = soup.find("span", { "id": "static_bug_status" }).string.strip().capitalize() assignee = utils.decode_entities( soup.findAll("span", {"class": "vcard"})[0].contents[0].string) self.irc.reply("Kernel.org %s [Status: %s, Assignee: %s] %s" % (desc, status, assignee, url)) except TypeError: return
def keyword_k(self, params=None, **kwargs): """Retrieve kernel.org Bugzilla bug information (ex: K12345)""" if params: params = utils.ensure_int(params) if not params: return query = urllib.urlencode({"id": params}) url = "http://bugzilla.kernel.org/show_bug.cgi?%s" % query response = self.irc.fetch_url(url, self.name) if not response or not isinstance(params, int): return soup = BeautifulSoup(response.read()) desc = utils.decode_entities(soup.head.title.string) try: status = soup.find("span", {"id": "static_bug_status"}).string.strip().capitalize() assignee = utils.decode_entities(soup.findAll("span", {"class": "vcard"})[0].contents[0].string) self.irc.reply("Kernel.org %s [Status: %s, Assignee: %s] %s" % (desc, status, assignee, url)) except TypeError: return
def keyword_lp(self, params=None, **kwargs): """Retrieve Launchpad bug information (ex: LP12345)""" if params: params = utils.ensure_int(params) if not params: return try: bug = self.launchpad.bugs[params] task = bug.bug_tasks[len(bug.bug_tasks) - 1] self.irc.reply("LP %s [Status: %s, Assignee: %s] %s" % ( task.title, task.status, self._find_name(task.assignee_link), bug.web_link)) except Exception: return
def keyword_lp(self, params=None, **kwargs): """Retrieve Launchpad bug information (ex: LP12345)""" if params: params = utils.ensure_int(params) if not params: return try: bug = self.launchpad.bugs[params] task = bug.bug_tasks[len(bug.bug_tasks) - 1] self.irc.reply( "LP %s [Status: %s, Assignee: %s] %s" % (task.title, task.status, self._find_name(task.assignee_link), bug.web_link)) except Exception: return
def keyword_task(self, params=None, **kwargs): """Retrieve VersionOne task information (ex: TK-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Task", "TK-%s" % params)
def keyword_goal(self, params=None, **kwargs): """Retrieve VersionOne goal information (ex: G-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Goal", "G-%s" % params)
def keyword_defect(self, params=None, **kwargs): """Retrieve VersionOne defect information (ex: D-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Defect", "D-%s" % params)
def keyword_backlog(self, params=None, **kwargs): """Retrieve VersionOne backlog information (ex: B-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Story", "B-%s" % params)
def keyword_request(self, params=None, **kwargs): """Retrieve VersionOne request information (ex: R-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Request", "R-%s" % params)
def keyword_issue(self, params=None, **kwargs): """Retrieve VersionOne issue information (ex: I-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Issue", "I-%s" % params)
def keyword_rmv(self, params=None, **kwargs): """Retrieve Verbose Redmine bug information (ex: RM12345)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_issue(params,verbose=True)
def keyword_rm(self, params=None, **kwargs): """Retrieve Redmine bug information (ex: RM12345)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_issue(params)
def test_ensure_int_3(self): self.assertEqual(utils.ensure_int("a"), None)
def test_ensure_int(self): self.assertEqual(utils.ensure_int("3"), 3)
def test_ensure_int_2(self): self.assertEqual(utils.ensure_int("\W"), None)
def keyword_epic(self, params=None, **kwargs): """Retrieve VersionOne epic information (ex: E-01234)""" if params and not self.disabled: params = utils.ensure_int(params) if params: self._find_asset("Epic", "E-%s" % params)
def keyword_rm(self, params=None, **kwargs): """Retrieve Redmine bug information (ex: RM12345)""" if params: params = utils.ensure_int(params) self._find_issue(params)