Skip to content

Creating an issue with a blank title should be validated locally before sending #9698

@NicksPatties

Description

@NicksPatties

Describe the feature or problem you’d like to solve

I accidentally selected a blank title for an issue I was writing. I spent a while working on the body of the issue in another editor before attempting to submit it. Once done, the submission failed. This is frustrating since I lost about 5 mins of effort writing my bug report.

❯  gh issue new

Creating issue in NicksPatties/sweet

? Title
? Choose a template Bug report
? Body <Received>
? What's next? Submit

X operation failed. To restore: gh issue create --recover /tmp/gh3317933051.json

GraphQL: Title can't be blank (createIssue)

Proposed solution

If the text of the title is blank, have the cli present an error, and ask the user to try again.

? Title # <presses Enter>
X Title cannot be blank. 
? Title # <user types in a title>
# ...

Additionally, make it clear that the title is required in some way.

? Title (required) # user types the title here
# ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-issuerelating to the gh issue commandhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions