Skip to content

Consider batching some operations like issue edit #5782

@heaths

Description

@heaths

Describe the feature or problem you’d like to solve

Some operations like issue edit might have a number of relatively expensive look ups for milestones, labels, etc. When scripting multiple operations, that penalty is paid with each operation.

Proposed solution

What if, instead, some operations supported batching operations together? For example, what if issue edit took 1 or more issue numbers except when changing the title or even body (that one is debatable) - things that are obviously singular? Alternatively, may operations where this makes sense could have a new verb like issue edit-multiple if breaking a previous failure case is a concern.

Additional context

I was updating 16 issues in a loop like so in PowerShell:

$issues = 1..16 # just an example
$issues | foreach { gh issue edit $_ --add-assignee @me --add-label Label --milestone Milestone }

This took just over 2 minutes and most likely due to the milestone lookup - possibly even the user lookup. If that tax was paid once I'm sure this would've been much faster e.g.,

$OFS=","; gh issue edit "$issues" --add-assignee @me --add-label Label --milestone Milestone

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions