fountainhead / action-wait-for-check

A GitHub Action that waits for another Check Run to have completed
MIT License
122 stars 44 forks source link

Inconsistent check run status returned #32

Open bakoontz2 opened 2 years ago

bakoontz2 commented 2 years ago

Not exactly an issue with this project, but does anyone know why the check run statuses that github returns are inconsistent? Sometimes "completed" is returned, even though the action being waited on is clearly not complete. Other times, it's clear that "in-progress" is correctly returned (based on logging the result from the listForRef call). More importantly, is there a fix that can be applied to this code to ensure the most up-to-date check status is returned?

The best solution I've found so far is to (1) add a delay prior to the call to listForRef() and (2) set the per_page argument to listForRef() to 1. (I don't know how to actually build this, so I'm just hacking index.js.) A proper build can be found in #33.