Beispiel #1
0
    def get_bugs(self, date="today", bug_ids=[], chunk_size=None):
        """Get the bugs"""
        bugs = self.get_data()
        params = self.get_bz_params(date)
        self.amend_bzparams(params, bug_ids)
        self.query_url = utils.get_bz_search_url(params)

        if isinstance(self, Nag):
            self.query_params = params

        old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
        try:
            if chunk_size:
                Bugzilla.BUGZILLA_CHUNK_SIZE = chunk_size

            Bugzilla(
                params,
                bughandler=self.bughandler,
                bugdata=bugs,
                timeout=self.get_config("bz_query_timeout"),
            ).get_data().wait()
        finally:
            Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE

        self.get_comments(bugs)

        return bugs
Beispiel #2
0
    def get_query_url_for_components(self, components):
        params = copy.deepcopy(self.query_params)
        for f in ["include_fields", "product", "component", "bug_id"]:
            if f in params:
                del params[f]

        utils.add_prod_comp_to_query(params, components)
        url = utils.get_bz_search_url(params)

        return url
    def get_query_url_for_triage_owner(self, owner):
        if self.all_owners is None:
            self.all_owners = utils.get_triage_owners()
        params = copy.deepcopy(self.query_params)
        if 'include_fields' in params:
            del params['include_fields']

        comps = self.all_owners[owner]
        comps = set(comps)

        params['component'] = sorted(comps)
        url = utils.get_bz_search_url(params)

        return url
Beispiel #4
0
    def get_query_url_for_triage_owner(self, owner):
        if self.all_owners is None:
            self.all_owners = utils.get_triage_owners()
        params = copy.deepcopy(self.query_params)
        if 'include_fields' in params:
            del params['include_fields']

        comps = self.all_owners[owner]
        comps = set(comps)

        params['component'] = sorted(comps)
        url = utils.get_bz_search_url(params)

        return url
Beispiel #5
0
    def get_bugs(self, date='today', bug_ids=[]):
        """Get the bugs"""
        bugs = self.get_data()
        params = self.get_bz_params(date)
        self.amend_bzparams(params, bug_ids)
        self.query_url = utils.get_bz_search_url(params)

        if isinstance(self, Nag):
            self.query_params = params

        Bugzilla(
            params,
            bughandler=self.bughandler,
            bugdata=bugs,
            timeout=utils.get_config(self.name(), 'bz_query_timeout'),
        ).get_data().wait()

        self.get_comments(bugs)

        return bugs  # TODO: attention au reverse_order (config/tools.json)
    def get_bugs(self, date='today', bug_ids=[]):
        """Get the bugs"""
        bugs = self.get_data()
        params = self.get_bz_params(date)
        self.amend_bzparams(params, bug_ids)
        self.query_url = utils.get_bz_search_url(params)

        if isinstance(self, Nag):
            self.query_params = params

        Bugzilla(
            params,
            bughandler=self.bughandler,
            bugdata=bugs,
            timeout=self.get_config('bz_query_timeout'),
        ).get_data().wait()

        self.get_comments(bugs)

        return bugs