third_party/blink/tools/blinkpy/w3c/export_notifier.py
def main(self):
        """Surfaces relevant Taskcluster check failures to Gerrit through comments."""
        gerrit_dict = {}

        try:
            _log.info('Searching for recent failiing chromium exports.')
            prs = self.wpt_github.recent_failing_chromium_exports()
        except GitHubError as e:
            _log.info(
                'Surfacing Taskcluster failures cannot be completed due to the following error:'
            )
            _log.error(str(e))
            return True

        if len(prs) > 100:
            _log.error('Too many open failing PRs: %s; abort.', len(prs))
            return True

        _log.info('Found %d failing PRs.', len(prs))
        for pr in prs:
            check_runs = self.get_check_runs(pr.number)
            if not check_runs:
                continue

            checks_results = self.get_relevant_failed_taskcluster_checks(
                check_runs, pr.number)
            if not checks_results:
                continue

            gerrit_id = self.wpt_github.extract_metadata(
                'Change-Id: ', pr.body)
            if not gerrit_id:
                _log.error('Can not retrieve Change-Id for %s.', pr.number)
                continue

            gerrit_sha = self.wpt_github.extract_metadata(
                WPT_REVISION_FOOTER, pr.body)
            gerrit_dict[gerrit_id] = PRStatusInfo(checks_results, pr.number,
                                                  gerrit_sha)

        self.process_failing_prs(gerrit_dict)
        return False
Surfaces relevant Taskcluster check failures to Gerrit through comments.
Surfaces relevant Taskcluster check failures to Gerrit through comments.
Surfaces relevant Taskcluster check failures to Gerrit through comments .
def main(self):
        gerrit_dict = {}
        try:
            _log.info('Searching for recent failiing chromium exports.')
            prs = self.wpt_github.recent_failing_chromium_exports()
        except GitHubError as e:
            _log.info(
                'Surfacing Taskcluster failures cannot be completed due to the following error:'
            )
            _log.error(str(e))
            return True
        if len(prs) > 100:
            _log.error('Too many open failing PRs: %s; abort.', len(prs))
            return True
        _log.info('Found %d failing PRs.', len(prs))
        for pr in prs:
            check_runs = self.get_check_runs(pr.number)
            if not check_runs:
                continue
            checks_results = self.get_relevant_failed_taskcluster_checks(
                check_runs, pr.number)
            if not checks_results:
                continue
            gerrit_id = self.wpt_github.extract_metadata(
                'Change-Id: ', pr.body)
            if not gerrit_id:
                _log.error('Can not retrieve Change-Id for %s.', pr.number)
                continue
            gerrit_sha = self.wpt_github.extract_metadata(
                WPT_REVISION_FOOTER, pr.body)
            gerrit_dict[gerrit_id] = PRStatusInfo(checks_results, pr.number,
                                                  gerrit_sha)
        self.process_failing_prs(gerrit_dict)
        return False
def main ( self ) : gerrit_dict = { } try : _log . info ( 'Searching for recent failiing chromium exports.' ) prs = self . wpt_github . recent_failing_chromium_exports ( ) except GitHubError as e : _log . info ( 'Surfacing Taskcluster failures cannot be completed due to the following error:' ) _log . error ( str ( e ) ) return True if len ( prs ) > 100 : _log . error ( 'Too many open failing PRs: %s; abort.' , len ( prs ) ) return True _log . info ( 'Found %d failing PRs.' , len ( prs ) ) for pr in prs : check_runs = self . get_check_runs ( pr . number ) if not check_runs : continue checks_results = self . get_relevant_failed_taskcluster_checks ( check_runs , pr . number ) if not checks_results : continue gerrit_id = self . wpt_github . extract_metadata ( 'Change-Id: ' , pr . body ) if not gerrit_id : _log . error ( 'Can not retrieve Change-Id for %s.' , pr . number ) continue gerrit_sha = self . wpt_github . extract_metadata ( WPT_REVISION_FOOTER , pr . body ) gerrit_dict [ gerrit_id ] = PRStatusInfo ( checks_results , pr . number , gerrit_sha ) self . process_failing_prs ( gerrit_dict ) return False
Surfaces relevant Taskcluster check failures to Gerrit through comments.
Surfaces relevant Taskcluster check failures to Gerrit through comments .
"""Surfaces relevant Taskcluster check failures to Gerrit through comments."""
self