sindresorhus/refined-github

Add a `Convert to draft` button on release pages #3014

szmarczak posted onGitHub

Example URL: https://github.com/sindresorhus/got/releases/tag/v11.0.0-beta.1

Possible layout:

image

Possible solution:

  1. Prompt the user to type the release tag.
  2. Remove the release.
  3. Draft a new release release.

Why:

Sometimes you publish a release instead of making a draft.


How will this handle release assets?

posted by yakov116 almost 5 years ago

How will this handle release assets?

We don't have to concern ourselves with that. Apparently there's an API endpoint to change the draft status, so this looks like an easy feature: https://docs.github.com/en/rest/reference/repos#update-a-release (we can use api.v3 in this case)

posted by fregante over 4 years ago

2 things.

  1. We need to make an api request to get the release id.
  2. I tried it out. It dumps everything and just places it into a draft. it does not copy the text etc. We would need to pass that along Edit: I am wrong I must have messed up when I was playing around with the api.
posted by yakov116 over 4 years ago

Thank you, amazing work 🙌👌

posted by szmarczak over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests