Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@k-jun
Copy link

@k-jun k-jun commented Jan 10, 2022

Description

Fixes #4993

when --discussion-category and additional assets are given at the same time, the created release doesn't contain the specified discussion.

$ gh release create abc/1.2.3-rc2 --discussion-category "Announcements" --generate-notes hello.txt

there are two reasons for causing this bug.

  • the assets uploading process is creating draft release, uploading, and publish the release.
  • discussion-category doesn't included in draft release.

in the draft creation phase, discussion_category_name is attached to the body but it is invalid 'cause the second reason.
in the publish phase, --discussion-category is not included, so that the --discussion-category setting isn't applied to the created release.

Changes

To fix that, I just add discussion_category_name value in the publish release api's body.

@k-jun k-jun marked this pull request as ready for review January 10, 2022 17:44
@k-jun k-jun requested a review from a team as a code owner January 10, 2022 17:44
@k-jun k-jun requested review from vilmibm and removed request for a team January 10, 2022 17:44
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Jan 10, 2022
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

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

Thanks! This is a good start, but I'd like to see two things: 1) a typed struct passed to publishRelease instead of a map and 2) tests

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.

@vilm I've addressed the code review so this can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team needs-user-input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using discussion-category and uploading files is incompatible in gh release create

4 participants