Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions bot/code_review_bot/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
7 changes: 7 additions & 0 deletions bot/code_review_bot/report/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions bot/code_review_bot/report/mail_builderrors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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"
Expand Down