Closed jacobrosenthal closed 8 years ago
@jacobrosenthal Thanks for this pull request! These will be great additions. Some issues though.
opts
is not declared so the user provided options are all that get passed to createRelease.
Regardless, I would like to clean this up as follows:NodePreGypGithub.prototype.createRelease = function(args, callback) {
var options = {
'owner': options.owner || this.owner,
'repo': this.repo,
'tag_name': this.package_json.version,
'target_commitish': 'master',
'name': 'v' + this.package_json.version,
'body': this.package_json.name + ' ' + this.package_json.version,
'draft': true,
'prerelease': false
};
Object.keys(args).forEach(function(key) {
options[key] = args[key] || options[key];
});
this.github.authenticate(this.authenticate_settings());
this.github.releases.createRelease(options, callback);
};
Can you kindly make these updates and resubmit? Thanks.
@jacobrosenthal are you going to make these changes? Or would you rather I just make them?
Im in rural wisconsin in and out of bandwidth on family issues right now. If you want to that would be totally fine with me :) Otherwise I fly out this weekend.
Thanks for this @jacobrosenthal. I went ahead and added these through a separate commit. Therefore I am closing this one.
We use a CI server to release, and if the release isn't publish node-pre-gyp-github doesnt appear to be able to find the current release and add binaries to it.
My solution was to just hardcode draft:false which has been working for us but wed like to upstream, see https://github.com/voodootikigod/node-serialport/issues/644
Ive broken them out maintaining the defaults, and added the -r option to the publish subcommand which sets draft:false.
Could use a good test yet. Thoughts?