Skip to content

People doesn't want to publish release when specify -d option#4542

Merged
samcoe merged 2 commits intocli:trunkfrom
Sixeight:fix-release-create-d-option
Oct 19, 2021
Merged

People doesn't want to publish release when specify -d option#4542
samcoe merged 2 commits intocli:trunkfrom
Sixeight:fix-release-create-d-option

Conversation

@Sixeight
Copy link
Contributor

Fixes #4541

gh release create -d v1.2.3
? Title (optional)
? Release notes Leave blank
? Is this a prerelease? No
? Submit?  [Use arrows to move, type to filter]
> Save as draft
  Cancel

@Sixeight Sixeight requested a review from a team as a code owner October 17, 2021 10:41
@Sixeight Sixeight requested review from samcoe and removed request for a team October 17, 2021 10:41
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Agreed that it was weird to default to "Publish release" if you specified --draft when invoking the command.

However, since we're in interactive mode anyway, I see no harm in allowing "Publish release". Maybe a user could change their mind since specifying --draft? How would you feel about keeping the selection options as-is, but just have a default of "Save as draft" if --draft was given? You can define a Default field in the survey.Select struct.

@Sixeight Sixeight force-pushed the fix-release-create-d-option branch from 30f45f6 to c7f79e8 Compare October 19, 2021 13:38
@Sixeight
Copy link
Contributor Author

@mislav Thank you for you review. I did change to set default of publish action.

@samcoe samcoe self-assigned this Oct 19, 2021
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sixeight Thanks for the contribution! This looks great, thanks for making the requested changed. I pushed a small tiny polish commit 💅. I think this is ready to go.

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

Successfully merging this pull request may close these issues.

The -d option of gh release create is not working properly.

3 participants