Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to discard a draft? #13

Closed
chetbox opened this issue Jun 14, 2019 · 4 comments · May be fixed by retorquere/zotero-bulk-mas-import#6 or retorquere/zotero-creator-metaphone#5
Closed

Possible to discard a draft? #13

chetbox opened this issue Jun 14, 2019 · 4 comments · May be fixed by retorquere/zotero-bulk-mas-import#6 or retorquere/zotero-creator-metaphone#5

Comments

@chetbox
Copy link

chetbox commented Jun 14, 2019

If I create a draft with --draft can I then discard the draft using this library? I've experimented and haven't found a way to do it with the existing options.

@cheton
Copy link
Owner

cheton commented Jun 14, 2019

This feature is not available in current release. I can modify the code that will allow you to delete a release if no files are specified.

Delete release assets if files specified

github-release delete \
  --owner cheton \
  --repo github-release-cli \
  --tag "v0.1.0" \
  archive.zip index.html "app.*"

Delete release if no files specified

github-release delete \
  --owner cheton \
  --repo github-release-cli \
  --tag "v0.1.0" \

@cheton
Copy link
Owner

cheton commented Jun 14, 2019

It seems that only prerelease can be deleted by specifying the tag name, draft is not possible. You have to specify the release id to delete a draft.

@cheton
Copy link
Owner

cheton commented Jun 14, 2019

Fixed in 1.3.0, now you delete a draft using the release id:

  1. List all releases
$ github-release list --owner cheton --repo github-release-cli
* tag_name="v1.3.0", name="v1.3.0", id=17995869
* tag_name="v1.2.0", name="v1.2.0", id=17868010
* tag_name="v1.1.0", name="v1.1.0", id=16558634
* tag_name="v1.0.1", name="v1.0.1", id=15307313
* tag_name="v1.0.0", name="v1.0.0", id=15036892
* tag_name="v0.4.1", name="v0.4.1", id=11088835
* tag_name="v0.4.0", name="v0.4.0", id=11080368
* tag_name="v0.3.0", name="v0.3.0", id=5352113
* tag_name="v0.2.2", name="v0.2.2", id=5349924
* tag_name="v0.2.1", name="v0.2.1", id=5348639
* tag_name="v0.2.0", name="v0.2.0", id=5348496
* tag_name="v0.1.1", name="v0.1.1", id=5348396
* tag_name="v0.1.0", name="v0.1.0", id=5348201
  1. Delete a release using the release id
$ github-release delete \
    --token <token> \
    --owner cheton \
    --repo github-release-cli \
    --release-id 17995869

@cheton cheton closed this as completed Jun 14, 2019
@chetbox
Copy link
Author

chetbox commented Jun 14, 2019

This is really helpful. Thanks for your quick work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants