third_party/blink/tools/blinkpy/w3c/export_notifier.py
def process_failing_prs(self, gerrit_dict):
        """Processes and comments on CLs with failed Tackcluster checks."""
        _log.info('Processing %d CLs with failed Taskcluster checks.',
                  len(gerrit_dict))
        for change_id, pr_status_info in gerrit_dict.items():
            _log.info('Change-Id: %s', change_id)
            try:
                cl = self.gerrit.query_cl_comments_and_revisions(change_id)
                has_commented = self.has_latest_taskcluster_status_commented(
                    cl.messages, pr_status_info)
                if has_commented:
                    _log.info('Comment is up-to-date. Nothing to do here.')
                    continue

                revision = cl.revisions.get(pr_status_info.gerrit_sha)
                if revision:
                    cl_comment = pr_status_info.to_gerrit_comment(
                        revision['_number'])
                else:
                    cl_comment = pr_status_info.to_gerrit_comment()

                if self.dry_run:
                    _log.info('[dry_run] Would have commented on CL %s\n',
                              change_id)
                    _log.debug('Comments are:\n%s\n', cl_comment)
                else:
                    _log.info('Commenting on CL %s\n', change_id)
                    cl.post_comment(cl_comment)
            except GerritError as e:
                _log.error('Could not process Gerrit CL %s: %s', change_id,
                           str(e))
                continue
Processes and comments on CLs with failed Tackcluster checks.
Processes and comments on CLs with failed Tackcluster checks.
Processes and comments on CLs with failed Tackcluster checks .
def process_failing_prs(self, gerrit_dict):
        _log.info('Processing %d CLs with failed Taskcluster checks.',
                  len(gerrit_dict))
        for change_id, pr_status_info in gerrit_dict.items():
            _log.info('Change-Id: %s', change_id)
            try:
                cl = self.gerrit.query_cl_comments_and_revisions(change_id)
                has_commented = self.has_latest_taskcluster_status_commented(
                    cl.messages, pr_status_info)
                if has_commented:
                    _log.info('Comment is up-to-date. Nothing to do here.')
                    continue
                revision = cl.revisions.get(pr_status_info.gerrit_sha)
                if revision:
                    cl_comment = pr_status_info.to_gerrit_comment(
                        revision['_number'])
                else:
                    cl_comment = pr_status_info.to_gerrit_comment()
                if self.dry_run:
                    _log.info('[dry_run] Would have commented on CL %s\n',
                              change_id)
                    _log.debug('Comments are:\n%s\n', cl_comment)
                else:
                    _log.info('Commenting on CL %s\n', change_id)
                    cl.post_comment(cl_comment)
            except GerritError as e:
                _log.error('Could not process Gerrit CL %s: %s', change_id,
                           str(e))
                continue
def process_failing_prs ( self , gerrit_dict ) : _log . info ( 'Processing %d CLs with failed Taskcluster checks.' , len ( gerrit_dict ) ) for change_id , pr_status_info in gerrit_dict . items ( ) : _log . info ( 'Change-Id: %s' , change_id ) try : cl = self . gerrit . query_cl_comments_and_revisions ( change_id ) has_commented = self . has_latest_taskcluster_status_commented ( cl . messages , pr_status_info ) if has_commented : _log . info ( 'Comment is up-to-date. Nothing to do here.' ) continue revision = cl . revisions . get ( pr_status_info . gerrit_sha ) if revision : cl_comment = pr_status_info . to_gerrit_comment ( revision [ '_number' ] ) else : cl_comment = pr_status_info . to_gerrit_comment ( ) if self . dry_run : _log . info ( '[dry_run] Would have commented on CL %s\n' , change_id ) _log . debug ( 'Comments are:\n%s\n' , cl_comment ) else : _log . info ( 'Commenting on CL %s\n' , change_id ) cl . post_comment ( cl_comment ) except GerritError as e : _log . error ( 'Could not process Gerrit CL %s: %s' , change_id , str ( e ) ) continue
Processes and comments on CLs with failed Tackcluster checks.
Processes and comments on CLs with failed Tackcluster checks .
"""Processes and comments on CLs with failed Tackcluster checks."""
self
gerrit_dict