in bot/code_coverage_bot/hooks/repo.py [0:0]
def run(self):
changesets = self.get_hgmo_changesets()
if not any(
parse_revision_id(changeset["desc"]) is not None for changeset in changesets
):
logger.info(
"None of the commits in the try push are linked to a Phabricator revision"
)
return
self.retrieve_source_and_artifacts()
reports = self.build_reports(only=[("all", "all")])
logger.info("Built all covdir reports", nb=len(reports))
# Retrieve the full report
full_path = reports.get(("all", "all"))
assert full_path is not None, "Missing full report (all:all)"
report = json.load(open(full_path))
# Upload coverage on phabricator
self.upload_phabricator(report, changesets)
# Index on Taskcluster
self.index_task(
[
"project.relman.code-coverage.{}.repo.try.{}".format(
secrets[secrets.APP_CHANNEL], self.revision
),
"project.relman.code-coverage.{}.repo.try.latest".format(
secrets[secrets.APP_CHANNEL]
),
]
)