Skip to content

label and possibly other options not set if milestone doesn't exist or set to none #2369

@rkennesson

Description

@rkennesson

Describe the bug

--label "bug" (and possibly other options as well) doesn't set the label if milestone is chosen in the menu but one doesn't exist or user selects none from menu

gh version 1.2.0 (2020-10-27)

Steps to reproduce the behavior

typing `` then selecting a milestone when none have been defined drops the label setting

  1. gh issue create --title "Issue 3" --label "bug"
  2. type e, and type issue body
  3. select milestone when none have been configured or user selects none from menu
  4. menu goes back to beginning highlighting submit; press submit
  5. github issue created but with no label

Expected vs actual behavior

actual: label not set

expected: possibly set the label and ignore the missing milestone or error out and not do anything

Logs

issue created with no label

gh issue create --title "Issue 4" --label "bug"

Creating issue in <repo>

? Body <Received>
? What's next? Add metadata
? What would you like to add? Projects
warning: no projects to choose from
? What's next? Submit
 <repo>/issues/4

issue created with no label

gh issue create --title "Issue 4" --label "bug"

Creating issue in  <repo>

? Body <Received>
? What's next? Add metadata
? What would you like to add? Milestone
? Milestone (none)
? What's next? Submit
 <repo>/issues/5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomepriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions