Fix tag message option hidden
This fixes the option in `gh release create` to generate release notes from the tag message being hidden whenever generated notes are available. This changes the behavior from hiding "generate from tag" and "generate from commit log" being hidden to *only* the "generate from commit log" option being hidden. Fixes #5027
This commit is contained in:
parent
ad8d7bb02e
commit
e8dfa9e728
1 changed files with 6 additions and 4 deletions
|
|
@ -234,7 +234,7 @@ func createRun(opts *CreateOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if opts.RepoOverride == "" && generatedNotes == nil {
|
||||
if opts.RepoOverride == "" {
|
||||
headRef := opts.TagName
|
||||
tagDescription, _ = gitTagInfo(opts.TagName)
|
||||
if tagDescription == "" {
|
||||
|
|
@ -245,9 +245,11 @@ func createRun(opts *CreateOptions) error {
|
|||
headRef = "HEAD"
|
||||
}
|
||||
}
|
||||
if prevTag, err := detectPreviousTag(headRef); err == nil {
|
||||
commits, _ := changelogForRange(fmt.Sprintf("%s..%s", prevTag, headRef))
|
||||
generatedChangelog = generateChangelog(commits)
|
||||
if generatedNotes == nil {
|
||||
if prevTag, err := detectPreviousTag(headRef); err == nil {
|
||||
commits, _ := changelogForRange(fmt.Sprintf("%s..%s", prevTag, headRef))
|
||||
generatedChangelog = generateChangelog(commits)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue