Visitar URL original
Add `bulk` command by mislav · Pull Request #831 · cli/cli · GitHub
The Wayback Machine - https://web.archive.org/web/20200529203053/https://github.com/cli/cli/pull/831
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `bulk` command #831

Draft
wants to merge 2 commits into
base: search-cmd
from
Draft

Add `bulk` command #831

wants to merge 2 commits into from

Conversation

@mislav
Copy link
Member

mislav commented Apr 24, 2020 •

The "bulk" command receives a list of identifiers on standard input and performs a bulk operation on them. The features proposed here did not pass any design phase yet.

Synopsis:

gh bulk {add|browse|open|close}

Valid operations:

  • add: adds all labels specified by --label
  • browse: opens all items in the web browser
  • open: changes issue states to "open"
  • close: changes issue states to "closed"

Works well with search output #830

Examples:

$ gh issue list | gh bulk add --label "new" --label "help wanted"

$ gh search repos '...' | gh bulk browse
mislav added 2 commits Apr 24, 2020
@vilmibm
Copy link
Member

vilmibm commented Apr 29, 2020

I absolutely love the spirit of this. I want to explore, though, exposing this behaviour through existing noun-verb commands like this:

gh issue list | gh issue close or even just allowing gh issue list | xargs gh issue close

gh search repos '...' | gh repo view

i believe we can augment our existing commands to notice when STDIN isn't a terminal and then act like the bulk command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.