cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

Add support for GH_REPO environment variable #8

Closed samcoe closed 2 years ago

samcoe commented 2 years ago

The CurrentRepository function should take into account the GH_REPO environment variable, and if it is specified return that repository rather than the current flow of looking at the filesystem and git remotes.

As part of this work we should make the parsing function used for parsing GH_REPO into a repository available for user consumption.

cc https://github.com/cli/go-gh/issues/5