coq/bot

`update_bench_status` should check whether status is valid before querying GitHub.

Opened this issue · 0 comments

In update_bench_status, there are a few statuses ("created", "pending"...) that won't trigger any status check creation on GitHub:

bot/src/actions.ml

Lines 505 to 508 in a660554

| "created" ->
Lwt_io.printlf "Bench job has been created, ignoring info update."
| _ ->
Lwt_io.printlf "Unknown state for bench job: %s" state ) )

But we query GitHub in all cases, only to discard the result of the query in the cases mentioned above:

GitHub_queries.get_repository_id ~bot_info ~owner:gh_owner ~repo:gh_repo

We should check that we are in one of the cases where a status check will be created on GitHub before doing anything else.