Skip to content

Update flags language #68

Description

@ampinsk

What currently exists

Global flags:

-B, --current-branch string   current git branch
-h, --help                    help for gh
-R, --repo string             current GitHub repository

Flags for pr create

  -T, --base string    The branch into which you want your code merged
  -b, --body string    Supply a body. Will prompt for one otherwise.
  -d, --draft          Mark PR as a draft
  -h, --help           help for create
  -t, --title string   Supply a title. Will prompt for one otherwise.

Flags for issue create

  -h, --help                  help for create
  -m, --message stringArray   set title and body
  -w, --web                   open the web browser to create an issue

Flags for pr list

  -b, --base string         filter by base branch
  -h, --help                help for list
  -l, --label stringArray   filter by label
  -L, --limit int           maximum number of items to fetch (default 30)
  -s, --state string        filter by state (default "open")

Flags for issue list

  -a, --assignee string   filter by assignee
  -h, --help              help for list
  -l, --label strings     filter by label
  -L, --limit int         maximum number of issues to fetch (default 30)
  -s, --state string      filter by state (open|closed|all)

Proposed new flags

Global flags:

-h, --help                    Help for gh
-R, --repo string             Select GitHub repository
-V, --version .               Version for gh

Flags for pr create and issue create

-B, --base string	The branch into which you want your code merged
-b, --body string	Supply a body. Will prompt for one otherwise.
-d, --draft		Mark PR as a draft
-h, --help		Help for create
-t, --title string	Supply a title. Will prompt for one otherwise.
-w, --web		Create in web browser

Flags for pr list and issue list

-a, --assignee string		Filter by assignee
-B, --base string		Filter by base branch
-h, --help			Help for list
-l, --label strings		Filter by label
-L, --limit int			Maximum number of items to fetch (default 30)
-s, --state string		Filter by state (open|closed|all, default "open")

note: issue create and issue list won't include the --base flag

Flags for pr view and issue view

-t, --text		Output title and body of [issue/pull request]

note: this is new functionality that we can open up a separate issue for

Activity

  1. ampinsk commented on Nov 19, 2019

    @ampinsk
    Author
  2. self-assigned this
    on Nov 19, 2019
  3. mislav commented on Nov 22, 2019

    @mislav
    Contributor

    Based on the current design spec, enumerating some engineering tasks:

    • Use sentence case for everything, including flag help text
    • Drop -B, --current-branch global flag
    • pr: change shorthand for --base to -B
    • pr create: support --web
    • pr list: support -a, --assignee
    • Explore if we can replace Cobra's string, int, strings, stringArray etc. with something more human-friendly I've looked into this and this would be too much hassle to do before the alpha. These values don't come from Cobra, but from the pflag package that Cobra is using, and this extra level of indirection makes it harder to change.
  4. ampinsk commented on Nov 22, 2019

    @ampinsk
    Author

    Updated the issue with what was in the doc! This should be ready to go whenever we want to prioritize it.

  5. changed the title [-]Evaluate flags language[/-] [+]Update flags language[/+] on Nov 22, 2019
  6. removed their assignment
    on Dec 3, 2019
  7. mislav commented on Dec 3, 2019

    @mislav
    Contributor

    Closing since all items are checked off except for gh pr create --web which has a corresponding card on the project board.

  8. added a commit that references this issue on Sep 28, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions