What event is triggered for turning a Draft PR into a PR? #23427
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hey @Andre601 ! I think there is a webhook that fires for that: Check out the |
Beta Was this translation helpful? Give feedback.
-
If I understand this right would the And I assume this is a normal PullRequestEvent within the public API (Linked in my OP)? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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.