lewagon / wait-on-check-action

This action can be used to halt any workflow until required checks for a given ref (e.g., in a sibling workflow) pass successfully.
MIT License
339 stars 62 forks source link

When multiple runs exist for the same head, the action should consider only the latest #85

Open Johennes opened 1 year ago

Johennes commented 1 year ago

We're using the wait-on-check action for downstream tests. In particular this means the action is triggered from a commit in one repository and then runs the downstream tests using the current HEAD of another repository. This creates a problem because the action currently looks at all checks for that HEAD – including those triggered from previous commits to the first repository. To prevent that, I think the action should filter the checks so that only the latest one for each name / ID is taken into account.

radnov commented 10 months ago

I'm experiencing the same issue.

@matiasalbarello I'm tagging you because you show up as the top contributor in this repo. Any ideas about this?

t3chguy commented 10 months ago

@radnov you can try using my fork or commits if you like https://github.com/lewagon/wait-on-check-action/compare/master...t3chguy:wait-on-check-action:master - no guarantees obviously

radnov commented 10 months ago

Wow, thank you so much for the rapid and helpful response @t3chguy! Using the commit sha didn't come to mind ... 🤦

dror-wing commented 9 months ago

Thank you ! please consider merging it, this is a well needed feature.