From 7015e3a7a78a9e29c47ed6e03c3ae4cab35f970e Mon Sep 17 00:00:00 2001 From: Bastien Abadie Date: Wed, 20 May 2026 15:24:01 +0200 Subject: [PATCH 1/2] Do not run phab/github reporters on opposite revisions --- bot/code_review_bot/git.py | 2 -- bot/code_review_bot/report/github.py | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bot/code_review_bot/git.py b/bot/code_review_bot/git.py index 75a19e1f4..b5378c775 100644 --- a/bot/code_review_bot/git.py +++ b/bot/code_review_bot/git.py @@ -32,8 +32,6 @@ def git_clone(base_repository, head_repository, revision, destination): base_slug = build_repo_slug(base_repository) head_slug = build_repo_slug(head_repository) - logger.info(base_slug, head_slug) - # Clone or fetch upstream path = destination / base_slug if path.exists() and (path / ".git").is_dir(): diff --git a/bot/code_review_bot/report/github.py b/bot/code_review_bot/report/github.py index 25db93bf6..735ee807e 100644 --- a/bot/code_review_bot/report/github.py +++ b/bot/code_review_bot/report/github.py @@ -5,6 +5,7 @@ import structlog from code_review_bot.report.base import Reporter +from code_review_bot.revisions import GithubRevision from code_review_bot.sources.github import GithubClient, ReviewEvent logger = structlog.get_logger(__name__) @@ -34,6 +35,12 @@ def publish(self, issues, revision, task_failures, notices, reviewers): """ Publish issues on a Github pull request. """ + if not isinstance(revision, GithubRevision): + logger.info( + "Skipping github reporting, only available for Github revisions" + ) + return + if reviewers: raise NotImplementedError # Avoid publishing a patch from a de-activated analyzer From 6ff5ac271ac4defe75c1d0c3bf91475fcdf65953 Mon Sep 17 00:00:00 2001 From: Bastien Abadie Date: Wed, 20 May 2026 15:48:24 +0200 Subject: [PATCH 2/2] Skip build error for github --- bot/code_review_bot/report/mail_builderrors.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/code_review_bot/report/mail_builderrors.py b/bot/code_review_bot/report/mail_builderrors.py index d1879eb61..fd57ace18 100644 --- a/bot/code_review_bot/report/mail_builderrors.py +++ b/bot/code_review_bot/report/mail_builderrors.py @@ -6,6 +6,7 @@ from code_review_bot import taskcluster from code_review_bot.report.base import Reporter +from code_review_bot.revisions import PhabricatorRevision logger = structlog.get_logger(__name__) @@ -34,6 +35,12 @@ def publish(self, issues, revision, task_failures, links, reviewers): """ Send an email to the author of the revision """ + if not isinstance(revision, PhabricatorRevision): + logger.info( + "Skipping build error reporting, only available for Phabricator revisions" + ) + return + assert ( revision.phabricator_id and revision.phabricator_phid ), "PhabricatorRevision must have a Phabricator ID and PHID"