Merge pull request #35 from tituspijean/patch-1

Add summary in response
This commit is contained in:
Alexandre Aubin 2022-01-09 22:48:00 +01:00 committed by GitHub
commit 8026d51138
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

3
run.py
View file

@ -1169,8 +1169,9 @@ async def github(request):
job_url = app.config.BASE_URL + app.url_for("html_job", job_id=job.id)
badge_url = app.config.BASE_URL + app.url_for("api_badge_job", job_id=job.id)
shield_badge_url = f"https://img.shields.io/endpoint?url={badge_url}"
summary_url = app.config.BASE_URL + f"/summary/{job.id}.png"
body = f"{catchphrase}\n[![Test Badge]({shield_badge_url})]({job_url})"
body = f"{catchphrase}\n[![Test Badge]({shield_badge_url})]({job_url})\n[![]({summary_url})]({job_url})"
api_logger.info(body)
await comment(body)