Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def process_build(self, build):
"""
Code review workflow to load all necessary information from Phabricator builds
received from the webserver
"""
assert build is not None, "Invalid payload"
assert isinstance(build, PhabricatorBuild)
# Update its state
self.update_state(build)
if build.state == PhabricatorBuildState.Public:
# Check if the author is not blacklisted
if self.is_blacklisted(build.revision):
return
# When the build is public, load needed details
try:
self.load_patches_stack(build)
logger.info("Loaded stack of patches", build=str(build))
except Exception as e:
logger.warning(
async def process_build(self, build):
assert build is not None, "Invalid payload"
assert isinstance(build, PhabricatorBuild)
# Start risk analysis
await self.start_risk_analysis(build)