We no longer guess the head repository using heuristics; instead, we
present the user with the choice of pushable repositories and an
additional option to create a new fork.
The new `pr create --head` flag is available for the user to specify the
head branch in `branch` or `owner:branch` format and completely skip any
forking or auto-pushing checks.
On first run in a git repository, `BaseRepo()` will now prompt the user
which repository should be queried as base repository if there are
multiple git remotes or when we are in the context of a fork.
In non-interactive mode, the prompt is skipped and we default to the
first git remote instead.
After the base repo is resolved, the result is cached in the local
repository using `git config` so that RepositoryNetwork API lookups can
be avoided in the future.
* add gh repo garden
* move file
* oops
* fixes
* fix clearing
* block windows sadly
* broken wip
* fix api thing
* do not add to client
* move helper as it does not work on windows
* hide command
* macos fix
* Update pkg/cmd/repo/garden/garden.go
Co-authored-by: Lee Reilly <lee@github.com>
* default for key input loop
* get redrawing working
* clean up garden update, it all works
* notes
* fix arrow keys and just do wads/arrows/vi
* this function is only called once now
* support ghes
* add a progress indicator
* cap maxCommits
Co-authored-by: Lee Reilly <lee@github.com>
Adding GITHUB_TOKEN & GITHUB_ENTERPRISE_TOKEN support orthogonal to
Config was getting out of hand, especially in `auth` commands that
adjust their messaging and error status based on the presence of these
environment variables.
The new approach builds in support for tokens from environment straight
into Config object by composition. Thus, commands need not ever be
concerned with any specific environment variables.
Due to our HTTP client default behavior, an `Accept` header is added to
all API requests. This is fine for all commands except `gh api`, where
the user should ideally have fine-grained control over most aspects of
HTTP requests and where there should be little to no defaults in general.