What event is triggered for turning a Draft PR into a PR?

Hopefully a simple question: What event is triggered when you turn a Draft PR into a PR? Is there even any event fired? And if so, will it be visible in https://api.github.com/users/:user/events/public?

I participate in a GitHub Action to display the latest activities you made on GitHub and this question came up, so I wanted to ask here in the hope that there is a good answer.

Hey @andre601 ! I think there is a webhook that fires for that:
https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request

Check out the action key in the payload, it has support for state changes between draft and non-draft states.

If I understand this right would the action field display converted_to_draft when you convert to a draft and ready_for_review for when it becomes a normal PR?

And I assume this is a normal PullRequestEvent within the public API (Linked in my OP)?

Looking at this further does this solution unfortunately not work for the (public) events endpoint as this kind of action nor the event associated with it seems to be posted there.

Oh no @andre601 it indeed seems my first response was a little short-sighted.

No, I don’t think your use case is possible. It might be a great idea for a feature request though. And who knows, maybe someone else around here knows a workaround.