Skip to content

Using the GH Api how do I tell when a PR was converted from draft and ready for review #24734

Discussion options

You must be logged in to vote

A Pull Request can switch back and forth between draft and ready to review so there’s no single value that you can rely on. However, because a Pull Request is a type of Issue you could derive this information from the Events history of the Pull Request.

The Timeline API is currently in preview so it is subject to change but if you’re comfortable using it during the preview period you could pull the Event history for each Pull Request and find the relevant convert_to_draft or ready_for_review event to determine how you categorise the Pull Request.

https://docs.github.com/en/rest/reference/issues#timeline

https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#con…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@StingyJack
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment