Closed ZedThree closed 1 year ago
Actually, this can be done in pure python:
# workflow id is an input: ${{github.event.workflow_run.id }}
workflow = repo.get_workflow_run(workflow_id)
for artifact in workflow.get_artifacts():
if artifact.name == "clang-tidy-review":
break
r = requests.get(artifact.archive_download_url, headers={"Authorization": f"token {token}")
contents = b"".join(r.iter_content())
zipfile.ZipFile(io.BytesIO(contents)).extractall()
Wrap up the steps needed to download the review artefact, extract the comments, and post them, into a composite workflow.
This might be easier with #53 or by creating a python package so that we don't need to build a docker image.