in src/reqfile-to-artifact/reqfile-to-artifact.py [0:0]
def trigger_cb(file_name: str, commit_hash: str, project_name: str) -> None:
"""
Trigger a CodeBuild project to initiate the scan process.
"""
cb_client = boto3.client("codebuild")
build = {
"projectName": project_name,
"sourceVersion": commit_hash,
"environmentVariablesOverride": [
{"name": "REQ_FILENAME", "value": file_name, "type": "PLAINTEXT"}
],
}
cb_client.start_build(**build)