How to delete all reviews of a PR via github action? #25785
-
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
To complete this, I did just what i suggested in the question. Works in production environment beautifully right now. EDIT:: I can share the code if anyone needs it, just leave a comment. |
Beta Was this translation helpful? Give feedback.
-
Hi @tomh-netbet, would you mind sharing what scripting you used to accomplish this? |
Beta Was this translation helpful? Give feedback.
To complete this, I did just what i suggested in the question.
I have listed all reviews for the PR, then used a bash script to run a foreach for every one of them and dismiss the review via the API.
Works in production environment beautifully right now.
EDIT:: I can share the code if anyone needs it, just leave a comment.