Skip to content

be able to ge repo without owner name #6155

@hans-d

Description

@hans-d

Describe the feature or problem you’d like to solve

Eg searching for prs in repos for a specific owner, will list the repo name including the owner name.
gh search prs --owner=bizzdesign --author @me --state open

Even with --json and --template only the reponame with owner can be shown, not without.

Proposed solution

Either add additional functions for the go template option (eg sprig), or enhance

cli/pkg/search/result.go

Lines 217 to 219 in ac036c1

data[f] = map[string]interface{}{
"nameWithOwner": nameWithOwner,
}

How will it benefit CLI and its users?

  • Specific for this: Less noise on the output/shorter output
  • When adding more functions: more control over output

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions