Esempio n. 1
0
    def handle_extracted_action(self, action, bugid, commit):
        """Handle a single extracted action and bugid."""
        self.log.info('Found action "{}" for bug id {}.'.format(action, bugid))

        # Find suitable Bugzilla tasks for the extracted action.
        task = utils.get_bugzilla_task_for_action(action, utils.get_task_dict_from_config(self.config))
        if task:
            self.log.info('The action "{}" matches the Bugzilla task {}.'.format(action, task))
            self.bugzilla_task_queue.put(utils.create_bugzilla_task(task, bugid, commit))
        else:
            self.log.warning('The action "{}" does not match any Bugzilla task.'.format(action))
Esempio n. 2
0
 def test_full_bugzilla_task(self):
     self.assertDictEqual(self.result, utils.create_bugzilla_task('a task', 1, self.commit))