Skip to content

gh gist create only shows privacy status when filename is provided #7644

Description

@seanbright

Describe the bug

When creating a gist with gh gist create, if you do not specify a filename the output of the command does not indicate if it is a public or secret gist.

$ gh --version
gh version 2.31.0 (2023-06-20)
https://github.com/cli/cli/releases/tag/v2.31.0
$ echo foo | gh gist create
- Creating gist...
✓ Created gist
https://gist.github.com/seanbright/...
$ echo foo | gh gist create --public
- Creating gist...
✓ Created gist
https://gist.github.com/seanbright/...
$ echo foo | gh gist create --filename foo.txt
- Creating gist foo.txt
✓ Created secret gist foo.txt
https://gist.github.com/seanbright/...
$ echo foo | gh gist create --filename foo.txt --public
- Creating gist foo.txt
✓ Created public gist foo.txt
https://gist.github.com/seanbright/...

Note that only the last 2 where --filename was provided are showing secret and public in the output.

Steps to reproduce the behavior

  1. Type $ echo foo | gh gist create --public and note that the output does not show public
  2. Type $ echo foo | gh gist create --public --filename foo.txt and note that the output does show public

Expected vs actual behavior

I expect the privacy status to appear in the output unconditionally.

Logs

See above.

Activity

  1. added 2 commits that reference this issue on Jun 29, 2023
    04be790
    78900cd
  2. added
    enhancementa request to improve CLI
    and removed
    bugSomething isn't working
    on Jun 30, 2023
  3. added a commit that references this issue on Jun 30, 2023
    d2a5823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions