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

Not possible to edit a prerelease to a published release #2

Closed
Crementif opened this issue May 21, 2018 · 4 comments
Closed

Not possible to edit a prerelease to a published release #2

Crementif opened this issue May 21, 2018 · 4 comments

Comments

@Crementif
Copy link

Is there any future plans for supporting this? Maybe a possibility of specifying --prerelease false would do this? Tell me if you've got any ideas, I'm probably able to make a pull request.

@cheton
Copy link
Owner

cheton commented May 21, 2018

Use a function to parse the optional value of draft and prerelease options can definitely fix the issue by specifying either --prerelease=false or --prerelease false. I will make the change if you're fine with it.

program
    .version(pkg.version)
    .usage('<command> [<args>]')
    .option('-T, --token <token>', 'OAuth2 token')
    .option('-o, --owner <owner>', 'owner')
    .option('-r, --repo <repo>', 'repo')
    .option('-t, --tag <tag>', 'tag')
    .option('-n, --name <name>', 'name')
    .option('-b, --body <body>', 'body', false)
    .option('-d, --draft [value]', 'draft', function(val) {
        if (String(val).toLowerCase() === 'false') {
            return false;
        }
        return true;
    })
    .option('-p, --prerelease [value]', 'prerelease', function(val) {
        if (String(val).toLowerCase() === 'false') {
            return false;
        }
        return true;
    });

@cheton
Copy link
Owner

cheton commented May 21, 2018

Published v0.4.1

Create a prerelease

github-release upload \
  --owner cheton \
  --repo github-release-cli \
  --tag "v0.1.0" \
  --name "v0.1.0" \
  --body "This is a prerelease" \
  --prerelease

Change a prerelease to a published release

github-release upload \
  --owner cheton \
  --repo github-release-cli \
  --tag "v0.1.0" \
  --name "v0.1.0" \
  --body "This is a published release" \
  --prerelease=false

Let me know if it works for you. Thanks.

@Crementif
Copy link
Author

Woah, thanks for the quick response and implementation. It's exactly what I needed.

Thanks for all the work you've put into this module!

@Crementif
Copy link
Author

Crementif commented May 21, 2018

I'm happy to report that it's working in my project.

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

No branches or pull requests

2 participants