How to delete all reviews of a PR via github action?

I would like to implement a git action that, given a draft PR, when clicking “ready for review” button, will dismiss all reviews(that happened during the draft stage…).

I see no dismiss all API for Github, so I would have to list all reviews on the PR, and dismiss them all, one by one.

Any suggestions?