Refined-github: Add a `Convert to draft` button on release pages

Created on 18 Apr 2020  路  4Comments  路  Source: sindresorhus/refined-github

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.

enhancement good first issue help wanted

All 4 comments

How will this handle release assets?

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)

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.

Thank you, amazing work 馃檶馃憣

Was this page helpful?
0 / 5 - 0 ratings